On Monday, January 30, 2017 at 3:57:26 PM UTC-8, Evgeny Mandrikov wrote:
>
> "report-aggregate" searches exec files relatively to location of
> dependencies within current Maven reactor using "dataFileIncludes" and
> "dataFileExcludes" - see
> http://www.jacoco.org/jacoco/trunk/doc/report-aggregate-mojo.html#dataFileIncludes
>
> Also you can have a look on its implementation at
> https://github.com/jacoco/jacoco/blob/master/jacoco-maven-plugin/src/org/jacoco/maven/ReportAggregateMojo.java
>
> And in addition to examples that were provided before -
> http://stackoverflow.com/a/41901853/244993 full working example (not just
> excerpt from pom) that uses "dataFileIncludes".
>
> Hope this helps,
> Evgney
>
I still can't get it to find the "coverage.exec" files from my child
modules.
This is a new excerpt from the "jacoco-aggregate" pom, which is a peer
child module to the modules with unit tests:
<dependencies>
<dependency>
<groupId>com.att.detsusl</groupId>
<artifactId>usl-account-impl</artifactId>
<version>2.3.0-SNAPSHOT</version>
</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>
<configuration>
<dataFileIncludes>**/target/coverage.exec
</dataFileIncludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
>From the "jacoco-aggregate" directory, I did a "find" of "coverage.exec"
files in the tree, and it includes at least
"../usl-account-impl/target/coverage.exec".
I've tried different variations of the "dataFileIncludes" property, like
just "target/coverage.exec".
I even tried running SysInternals "ProcMon" and watching for accesses to
"coverage.exec", and it only ever saw the one it tried to create in the
"jacoco-aggregate" directory.
I wish there was a way to get the process to be more verbose and describe
what it's actually looking for, and finding. I'm just poking in the dark
here.
>
> On Tuesday, January 31, 2017 at 12:19:50 AM UTC+1, David Karr wrote:
>>
>> I need more information. It generated the report, but it showed no
>> coverage. I'm guessing I have to somehow communicate the name of the
>> ".exec" file that I'm using.
>>
>> I constructed an additional module called "jacoco-aggregate", and this is
>> an excerpt of its POM:
>>
>
>>
> I added a dependency for each child module that has unit tests. I
>> verified that those individual modules are generating data. I looked at the
>> properties for report-aggregate, but it's not obvious how I configure it to
>> know what the name is of the data file in each module.
>>
>>
>
>
> On Tuesday, January 31, 2017 at 12:36:49 AM UTC+1, David Karr wrote:
>>
>>
>> And thinking more about this, if I simply specify child project
>> dependencies, how can "report-aggregate" even know where the datafile is
>> for each child project? Does it expect that the datafile would have been
>> installed as an artifact? That seems hard to believe.
>>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/028304e1-11ef-4130-b326-fc0649b73060%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.