Domanda

In JBoss AS 7 integration testsuite, we use JaCoCo for code coverage. I have the execution data already. Now when generating the report, I get "Can't add different class with same name: ..." So I have to exclude some jars.

<exclude name="org/jboss/osgi/framework/main/jbosgi-resolver-metadata-1.0.10.jar"/>

The problem is that only one class is duplicated (org/jboss/osgi/metadata/internal/AbstractPackageAttribute). I only want that particular class excluded, not whole jar.

I've tried:

 <exclude name="org/jboss/osgi/framework/main/**/AbstractPackageAttribute*"/>

But that doesn't work. Is there some special syntax, like .../foo.jar!**/ClassName.class?

È stato utile?

Soluzione

Use the zipfileset tag:

<sourcefiles>
  <zipfileset>
    <fileset dir="foo.jar">
      <exclude name="org/jboss/osgi/framework/main/**/AbstractPackageAttribute*.*"/>
    </fileset>
  </zipfileset>
</sourcefiles>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top