作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个大型的多模块 Maven 构建,目前混合了 PowerMock 和 Mockito 测试(很快将所有 PowerMock 测试移动到 Mockito)。父 pom 中的默认 jacoco-maven-plugin 配置用于“离线”检测,但带有 Mockito 测试的一个模块正在使用在线检测。我相信模块中的每个 jacoco.exec 文件都是正确构建的。
其中一个名为“jacoco-aggregate”的子模块只是尝试使用“merge”和“report-aggregate”目标。我正在使用“合并”,因为我正在与 SonarQube 集成,而我们使用的版本将只允许一个 exec 文件。从我可以看到的输出中,“合并”目标似乎工作正常。
“报告聚合”目标似乎有问题。它目前根本没有产生任何报道。显示的表格是空的。
以下是我在 jacoco 子模块本身中构建时得到的当前输出:
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ jacoco-aggregate ---
[INFO] Deleting <myhome>\git\oce_usl\usl-parent\jacoco-aggregate\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (filter) @ jacoco-aggregate ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory <myhome>\git\oce_usl\usl-parent\jacoco-aggregate\src\main\resources
[INFO]
[INFO] --- depends-maven-plugin:1.2:generate-depends-file (generate-depends-file) @ jacoco-aggregate ---
[INFO] Created: <myhome>\git\oce_usl\usl-parent\jacoco-aggregate\target\classes\META-INF\maven\dependencies.properties
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.8:report (default-report) @ jacoco-aggregate ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- maven-javadoc-plugin:2.10.4:jar (module-javadoc-jar) @ jacoco-aggregate ---
[INFO] Not executing Javadoc as the project is not a Java classpath-capable package
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.8:report-aggregate (report-aggregate) @ jacoco-aggregate ---
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.8:merge (merge) @ jacoco-aggregate ---
[INFO] Loading execution data file <myhome>\git\oce_usl\usl-parent\jacoco-aggregate\..\usl-account-impl\target\jacoco.exec
[INFO] Loading execution data file <myhome>\git\oce_usl\usl-parent\jacoco-aggregate\..\usl-core-impl\target\jacoco.exec
[INFO] Loading execution data file <myhome>\git\oce_usl\usl-parent\jacoco-aggregate\..\usl-creditcheck-impl\target\jacoco.exec
[INFO] Loading execution data file <myhome>\git\oce_usl\usl-parent\jacoco-aggregate\..\usl-ordercreation-impl\target\jacoco.exec
[INFO] Loading execution data file <myhome>\git\oce_usl\usl-parent\jacoco-aggregate\..\usl-payment-impl\target\jacoco.exec
[INFO] Loading execution data file <myhome>\git\oce_usl\usl-parent\jacoco-aggregate\..\usl-productandoffer-impl\target\jacoco.exec
[INFO] Writing merged execution data to <myhome>\git\oce_usl\usl-parent\jacoco-aggregate\target\jacoco.exec
[INFO]
<artifactId>jacoco-aggregate</artifactId>
<version>2.3.0-SNAPSHOT</version>
<name>jacoco-aggregate</name>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>com.att.detsusl</groupId>
<artifactId>usl-account-impl</artifactId>
<version>2.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.att.detsusl</groupId>
<artifactId>usl-core-impl</artifactId>
<version>2.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.att.detsusl</groupId>
<artifactId>usl-creditcheck-impl</artifactId>
<version>2.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.att.detsusl</groupId>
<artifactId>usl-csi-jaxb-base</artifactId>
<version>2.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.att.detsusl</groupId>
<artifactId>usl-ordercreation-impl</artifactId>
<version>2.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.att.detsusl</groupId>
<artifactId>usl-payment-impl</artifactId>
<version>2.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.att.detsusl</groupId>
<artifactId>usl-productandoffer-impl</artifactId>
<version>2.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.att.detsusl</groupId>
<artifactId>usl-servicefactory-impl</artifactId>
<version>2.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.att.detsusl</groupId>
<artifactId>usl-csi-icas-impl</artifactId>
<version>2.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.8</version>
<executions>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
<execution>
<id>merge</id>
<phase>verify</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<fileSets>
<fileSet>
<directory>${project.basedir}/../usl-account-impl/target</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../usl-core-impl/target</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../usl-creditcheck-impl/target</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../usl-csi-jaxb-base/target</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../usl-ordercreation-impl/target</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../usl-payment-impl/target</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../usl-productandoffer-impl/target</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../usl-servicefactory-impl/target</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</execution>
<execution>
<id>prepare-agent</id>
<phase>none</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-instrument</id>
<phase>none</phase>
<goals>
<goal>instrument</goal>
</goals>
</execution>
<execution>
<id>default-restore-instrumented-classes</id>
<phase>none</phase>
<goals>
<goal>restore-instrumented-classes</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>none</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
最佳答案
首先 - 看来你是 merge
在 report-aggregate
之后,所以最后一个看不到 jacoco.exec
.
另请注意 report-aggregate
调查 react 堆项目,即如果你有
root
\child_1
\child_2
mvn ...
期间在
root
reactor 将包含所有 3 个,而在
cd child_2 && mvn ...
执行期间reactor 将仅包含
child_2
.
关于maven - jacoco:report-aggregate 要么得到浅层覆盖,要么根本没有,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42450322/
根据 redux 的文档,reducer 总是给出一个新的状态副本。在连接的组件中,react-redux 对 mapStateToProps(旧与新 props)中提到的属性进行浅层比较。 我的困惑
我是一名优秀的程序员,十分优秀!