- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图从生成的 exec 文件生成 XML jacoco 报告,但是 ant
抛出一个错误,它无法在 jacocoant.jar 中找到 xml 文件。从 jar 中提取文件后,文件就在那里,并且在这个 build.xml 的其他用例中起作用。
从命令 ant -v -debug
记录
52336 $ ant -v -debug
Apache Ant(TM) version 1.9.6 compiled on June 29 2015
Trying the default build file: build.xml
Buildfile: /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.8 in: /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre
Detected OS: Mac OS X
Adding reference: ant.ComponentHelper
Setting ro project property: ant.file -> /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/build.xml
Setting ro project property: ant.file.type -> file
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/build.xml with URI = file:/Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/build.xml
Setting ro project property: ant.project.name -> product-43
Adding reference: product-43
Setting ro project property: ant.project.default-target -> rebuild
Setting ro project property: ant.file.product-43 -> /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/build.xml
Setting ro project property: ant.file.type.product-43 -> file
Project base dir set to: /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336
+Target:
+Target: clean
+Target: merge
+Target: report
+Target: rebuild
Adding reference: ant.LocalProperties
parsing buildfile jar:file:/usr/local/Cellar/ant/1.9.6/libexec/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/usr/local/Cellar/ant/1.9.6/libexec/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Setting project property: result.dir -> /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/target
Setting project property: result.classes.dir -> /Users/stephenraghunath/Downloads/gceDist/jacoco-classes
Setting project property: result.report.dir -> /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/target/site/jacoco
Setting project property: result.exec.file -> /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco.exec
parsing buildfile jar:file:/Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar!/org/jacoco/ant/antlib.xml with URI = jar:file:/Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar!/org/jacoco/ant/antlib.xml from a zip file
Finding class org.jacoco.ant.CoverageTask
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/ant/CoverageTask.class
Class org.apache.tools.ant.TaskContainer loaded from parent loader (parentFirst)
Finding class org.jacoco.ant.AbstractCoverageTask
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/ant/AbstractCoverageTask.class
Class org.apache.tools.ant.Task loaded from parent loader (parentFirst)
Class org.jacoco.ant.AbstractCoverageTask loaded from ant loader (parentFirst)
Class org.jacoco.ant.CoverageTask loaded from ant loader (parentFirst)
Class java.lang.Object loaded from parent loader (parentFirst)
Class java.lang.Throwable loaded from parent loader (parentFirst)
Class java.io.IOException loaded from parent loader (parentFirst)
Class org.apache.tools.ant.BuildException loaded from parent loader (parentFirst)
Class java.util.Collection loaded from parent loader (parentFirst)
+Datatype antlib:org.jacoco.ant:coverage org.jacoco.ant.CoverageTask
Finding class org.jacoco.ant.AgentTask
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/ant/AgentTask.class
Class org.jacoco.ant.AgentTask loaded from ant loader (parentFirst)
+Datatype antlib:org.jacoco.ant:agent org.jacoco.ant.AgentTask
Finding class org.jacoco.ant.ReportTask
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/ant/ReportTask.class
Class org.jacoco.ant.ReportTask loaded from ant loader (parentFirst)
Finding class org.jacoco.core.analysis.ICoverageVisitor
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/analysis/ICoverageVisitor.class
Class org.jacoco.core.analysis.ICoverageVisitor loaded from ant loader (parentFirst)
Finding class org.jacoco.core.analysis.ICoverageNode
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/analysis/ICoverageNode.class
Class org.jacoco.core.analysis.ICoverageNode loaded from ant loader (parentFirst)
Finding class org.jacoco.report.ISourceFileLocator
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/report/ISourceFileLocator.class
Class org.jacoco.report.ISourceFileLocator loaded from ant loader (parentFirst)
Finding class org.jacoco.core.analysis.IBundleCoverage
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/analysis/IBundleCoverage.class
Class org.jacoco.core.analysis.IBundleCoverage loaded from ant loader (parentFirst)
Finding class org.jacoco.ant.ReportTask$SourceFilesElement
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/ant/ReportTask$SourceFilesElement.class
Class org.apache.tools.ant.types.resources.Union loaded from parent loader (parentFirst)
Class org.jacoco.ant.ReportTask$SourceFilesElement loaded from ant loader (parentFirst)
Class java.util.Iterator loaded from parent loader (parentFirst)
Class java.util.List loaded from parent loader (parentFirst)
Finding class org.jacoco.report.IReportVisitor
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/report/IReportVisitor.class
Finding class org.jacoco.report.IReportGroupVisitor
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/report/IReportGroupVisitor.class
Class org.jacoco.report.IReportGroupVisitor loaded from ant loader (parentFirst)
Class org.jacoco.report.IReportVisitor loaded from ant loader (parentFirst)
+Datatype antlib:org.jacoco.ant:report org.jacoco.ant.ReportTask
Finding class org.jacoco.ant.MergeTask
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/ant/MergeTask.class
Class org.jacoco.ant.MergeTask loaded from ant loader (parentFirst)
+Datatype antlib:org.jacoco.ant:merge org.jacoco.ant.MergeTask
Finding class org.jacoco.ant.DumpTask
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/ant/DumpTask.class
Class org.jacoco.ant.DumpTask loaded from ant loader (parentFirst)
Finding class org.jacoco.core.tools.ExecDumpClient
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/tools/ExecDumpClient.class
Class org.jacoco.core.tools.ExecDumpClient loaded from ant loader (parentFirst)
Finding class org.jacoco.ant.DumpTask$1
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/ant/DumpTask$1.class
Class org.jacoco.ant.DumpTask$1 loaded from ant loader (parentFirst)
+Datatype antlib:org.jacoco.ant:dump org.jacoco.ant.DumpTask
Finding class org.jacoco.ant.InstrumentTask
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/ant/InstrumentTask.class
Class org.jacoco.ant.InstrumentTask loaded from ant loader (parentFirst)
Class java.lang.Exception loaded from parent loader (parentFirst)
Class java.io.OutputStream loaded from parent loader (parentFirst)
Class java.io.FileOutputStream loaded from parent loader (parentFirst)
Finding class org.jacoco.core.runtime.IExecutionDataAccessorGenerator
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/runtime/IExecutionDataAccessorGenerator.class
Class org.jacoco.core.runtime.IExecutionDataAccessorGenerator loaded from ant loader (parentFirst)
+Datatype antlib:org.jacoco.ant:instrument org.jacoco.ant.InstrumentTask
Setting ro project property: ant.project.invoked-targets -> rebuild
Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
Adding reference: ant.executor
Build sequence for target(s) `rebuild' is [clean, merge, report, rebuild]
Complete build sequence is [clean, merge, report, rebuild, ]
clean:
merge:
[antlib:org.jacoco.ant] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.
Class org.apache.tools.ant.types.ResourceCollection loaded from parent loader (parentFirst)
Class java.io.File loaded from parent loader (parentFirst)
Finding class org.jacoco.core.tools.ExecFileLoader
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/tools/ExecFileLoader.class
Class org.jacoco.core.tools.ExecFileLoader loaded from ant loader (parentFirst)
Finding class org.jacoco.core.data.ISessionInfoVisitor
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/data/ISessionInfoVisitor.class
Class org.jacoco.core.data.ISessionInfoVisitor loaded from ant loader (parentFirst)
Finding class org.jacoco.core.data.IExecutionDataVisitor
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/data/IExecutionDataVisitor.class
Class org.jacoco.core.data.IExecutionDataVisitor loaded from ant loader (parentFirst)
Class java.io.BufferedOutputStream loaded from parent loader (parentFirst)
Class java.io.InputStream loaded from parent loader (parentFirst)
Class java.io.BufferedInputStream loaded from parent loader (parentFirst)
Class java.io.FileInputStream loaded from parent loader (parentFirst)
Finding class org.jacoco.core.data.SessionInfoStore
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/data/SessionInfoStore.class
Class org.jacoco.core.data.SessionInfoStore loaded from ant loader (parentFirst)
Class java.util.ArrayList loaded from parent loader (parentFirst)
Finding class org.jacoco.core.data.ExecutionDataStore
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/data/ExecutionDataStore.class
Class org.jacoco.core.data.ExecutionDataStore loaded from ant loader (parentFirst)
Class java.util.Map loaded from parent loader (parentFirst)
Class java.util.Set loaded from parent loader (parentFirst)
Class java.util.HashMap loaded from parent loader (parentFirst)
Class java.util.HashSet loaded from parent loader (parentFirst)
fileset: Setup scanner in dir /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336 with patternSet{ includes: [**/*.exec] excludes: [] }
Class org.apache.tools.ant.types.Resource loaded from parent loader (parentFirst)
Class java.lang.String loaded from parent loader (parentFirst)
[jacoco:merge] Loading execution data file /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/10001.exec
Finding class org.jacoco.core.data.ExecutionDataReader
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/data/ExecutionDataReader.class
Class org.jacoco.core.data.ExecutionDataReader loaded from ant loader (parentFirst)
Finding class org.jacoco.core.data.IncompatibleExecDataVersionException
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/data/IncompatibleExecDataVersionException.class
Class org.jacoco.core.data.IncompatibleExecDataVersionException loaded from ant loader (parentFirst)
Finding class org.jacoco.core.internal.data.CompactDataInput
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/internal/data/CompactDataInput.class
Class java.io.DataInputStream loaded from parent loader (parentFirst)
Class org.jacoco.core.internal.data.CompactDataInput loaded from ant loader (parentFirst)
Finding class org.jacoco.core.data.SessionInfo
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/data/SessionInfo.class
Class java.lang.Comparable loaded from parent loader (parentFirst)
Class org.jacoco.core.data.SessionInfo loaded from ant loader (parentFirst)
Class java.lang.IllegalArgumentException loaded from parent loader (parentFirst)
Finding class org.jacoco.core.data.ExecutionData
Loaded from /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/jacoco/lib/jacocoant.jar org/jacoco/core/data/ExecutionData.class
Class org.jacoco.core.data.ExecutionData loaded from ant loader (parentFirst)
Class java.lang.IllegalStateException loaded from parent loader (parentFirst)
Class java.lang.Long loaded from parent loader (parentFirst)
Class org.apache.tools.ant.util.FileUtils loaded from parent loader (parentFirst)
BUILD FAILED
/Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/build.xml:17: Unable to read /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/10001.exec
at org.jacoco.ant.MergeTask.load(MergeTask.java:87)
at org.jacoco.ant.MergeTask.execute(MergeTask.java:67)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:853)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Caused by: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:197)
at java.io.DataInputStream.readLong(DataInputStream.java:416)
at org.jacoco.core.data.ExecutionDataReader.readExecutionData(ExecutionDataReader.java:147)
at org.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReader.java:115)
at org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:92)
at org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:59)
at org.jacoco.ant.MergeTask.load(MergeTask.java:85)
... 18 more
Total time: 0 seconds
最佳答案
根据日志末尾的堆栈跟踪 - 这与 jacocoant.jar
中的 xml 文件无关,MergeTask
失败:
BUILD FAILED
/Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/build.xml:17:
Unable to read /Users/stephenraghunath/Downloads/gceDist/jacoco-classes/df-coverage/exec/bundle/213864/52336/10001.exec
at org.jacoco.ant.MergeTask.load(MergeTask.java:87)
...
Caused by: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:197)
...
EOFException
表示失败的原因 - 文件 10001.exec
已损坏,请参阅 https://github.com/jacoco/jacoco/pull/397
关于java - 无法读取 Exec JaCoCo 文件 ANT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41141397/
我在我的一个模块中通过 JaCoCo 生成 AHP 报告时遇到问题。当构建开始时,我看到 JaCoCo 正确设置 argLine 为: [INFO] jacoco.agent.argLine set
我正在尝试将 JaCoCo 添加到我的 Android 以覆盖 Sonar Qube。但是在运行命令 ./gradlew jacocoTestReport 时,我收到以下错误。 Task :app:
我用过 lombok.@UtilityClass到: 生成私有(private)构造函数 使类(class)最终 将实用程序类中的所有字段设为静态 并且 Jacoco 不涵盖 Lombok 生成的代码
我正尝试在我的 project 上创建一个 jacoco 报告.该项目是 java 12 版本,jacoco-maven-plugin 是 0.8.5 版本。
我的项目是使用 Maven 构建的。我使用“Jacoco”插件来执行质量检查。 对于一个项目,我想在线检查测试覆盖率。我只想检查仅 3 个包裹的线路覆盖率。如何指定此检查? 我尝试“包括”一些软件包,
我有一个 Maven 项目(Java)的 jacoco-agent 生成文件,名为 jacoco.exec . 如何将此文件转换为人类可读的格式? (HTML/XML)。 最佳答案 我相信这是在 of
我正在使用 Bamboo、SonarQube 和 Maven 插件在 SonarQube 中生成 Jacoco 报告。它正在生成 jacoco.exec 文件,但如何在 SonarQube 中显示报告
我正在运行 Jacoco 的 Maven 插件。 prepare-agent 目标运行良好,但由于某种原因没有生成 jacoco.exec 文件。随后,报告目标提示由于缺少执行数据文件而跳过 JaCo
我在我的项目中设置了 Jacoco 来执行 a) 检查代码覆盖率和 b) 生成覆盖率报告。生成的 HTML 报告显示了正确的覆盖率值,但 Jacoco 检查在构建过程结束时生成的警告消息显示了不同的错
我用的是官方example Socket server为我的 jacocoagent.jar 启动一个套接字服务器来连接。我这样启动我的目标 jar : java -javaagent:jacocoa
当 Jacoco 代码覆盖率低于一定百分比时,我试图使 Gradle 构建失败。 ...
我有一个 maven 项目,使用“测试”阶段和“集成测试”阶段。在测试阶段,执行 JUnit 测试,在集成测试中有 HTMLUnit 测试。我正在使用 Jacoco[1]-maven-plugin 来
我遇到以下错误: Plugin execution not covered by lifecycle configuration: org.jacoco:jacoco-maven-plugin:0.7
我在 Tomcat 上部署了一个 Web 应用程序。在我进入更多细节之前,让我详细说明这些版本。 版本:jdk 1.7,Tomcat - 7.0.19,jacoco -0.5.6 我已将jdk1.7
我按照以下步骤使用 jacoco 测量代码覆盖率: 我已经使用 jacoco 代理动态检测了我的应用程序 wars 文件。 启动 tomcat 服务器。 运行一些测试用例。 已停止 tomcat 服务
我将我的 Ant 任务配置为
我正在尝试让 jacoco+gradle 一起工作。看看这个论坛,似乎有些人已经成功地做到了。但是当我尝试时,我遇到了一个奇怪的异常。 我做了什么: 1.下载gradle 2.2.1并配置环境变量等。
我正在开发 SAML One Login Toolkit,并从 GitHub 获取了最新的主分支 here并使用 Eclipse Oxygen。它应该手动解决所有 Maven 依赖项,但不幸的是事实并
SonarQube 7.7 针对 Java 项目分析显示以下警告: Property 'sonar.jacoco.reportPath' is deprecated (JaCoCo binary fo
我有一个在 jboss 7.1.3 上部署并使用 arquillian 进行测试的项目,我正在尝试向其中添加代码覆盖率指标。 我正在使用托管容器选项(jboss-as-arquillian-conta
我是一名优秀的程序员,十分优秀!