0

I configured 2 projects to use last jacoco version 0.7.8 and last Arquillian jacoco extension (1.0.09Alpha) it works like a charm (for jenkins and sonar 6.2)! but i have a bigger project, when i launch only Arquillian IT test my war archive is created and have all classes and so tests OK, when i run the same tests with IT code coverage, no class are included in the arquillian archive and have this error :

org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset to output: /WEB-INF/... Caused by: java.lang.RuntimeException: Could not instrument Asset org.jboss.shrinkwrap.api.asset.ClassLoaderAsset

Same configuration as other project BOM Arquillian 1.1.12Final arquillian suite 1.1.2 container 2.0.2 testng.....

any help ?

cyril
  • 872
  • 6
  • 29
  • Have you tried to narrow packages to be instrumented? – bartosz.majsak Jan 31 '17 at 16:43
  • yes i tried to make includes, excludes in arquillian.xml and in pom.xml, the error is strange because in shrinkwrap classes it try to copy an asset but the getOpenStream on the asset point the org.jboss.shrinkwrap.api.asset.ClassLoaderAsset instance..., moreover on the getArchive in ArchiveDeploymentClass the archive printed have all classes – cyril Jan 31 '17 at 19:18

1 Answers1

1

finally it was lib error indeed library asm-debug-all version was omitted because other library (apache-tika-parsers) already imported an older version (in pom.xml)... make an exclude in pom.xml fix the issue, we can check dependencies hierarchy in eclipse for example.

jacoco-arquillian extension use asm to instrument code...

 <dependency>
        <groupId>org.apache.tika</groupId>
        <artifactId>tika-parsers</artifactId>
        <version>1.9</version>
        <scope>${defaultScope}</scope>
        <exclusions>
            <exclusion>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcmail-jdk15</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm-debug-all</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
cyril
  • 872
  • 6
  • 29