Can't add different class with same name: org/apache/commons/collections/ArrayStack

200 views
Skip to first unread message

sjdu...@gmail.com

unread,
Nov 9, 2012, 2:49:48 PM11/9/12
to jac...@googlegroups.com
org/apache/commons/collections/ArrayStack shows up in three different dependency jars (commons-collections, commons-beanutils and commons-beanutils-core), with nearly identical classs files (the only difference that I can see is the amount of documentation), when I run jacoco-maven-plugin it fails due to org/apache/commons/collections/ArrayStack being found in multiple different places. I cannot exclude these dependencies because they are needed for the project to build. Is there anything I can do to work around this issue? Is it possible these paths are being hashed to the same value and thats why this issue is happening?

sjdu...@gmail.com

unread,
Nov 9, 2012, 2:52:18 PM11/9/12
to jac...@googlegroups.com, sjdu...@gmail.com
On Friday, November 9, 2012 1:49:48 PM UTC-6, sjdu...@gmail.com wrote:
> org/apache/commons/collections/ArrayStack shows up in three different dependency jars (commons-collections, commons-beanutils and commons-beanutils-core), with nearly identical classs files (the only difference that I can see is the amount of documentation), when I run jacoco-maven-plugin it fails due to org/apache/commons/collections/ArrayStack being found in multiple different places. I cannot exclude these dependencies because they are needed for the project to build. Is there anything I can do to work around this issue? Is it possible these paths are being hashed to the same value and thats why this issue is happening?

Oh, I should mention each of these dependencies are pulled in only once, so there aren't multiple versions of each being put into my class path.

Marc R. Hoffmann

unread,
Nov 10, 2012, 5:50:33 AM11/10/12
to jac...@googlegroups.com
Can you please provide a example POM? For me the questions is why do the
dependency JARs show up at all in the coverage report of your module.
Actually the report module is designed to only consider classes from the
module in question.

For class identity JaCoCo uses a CRC64 hash of the class file content,
the storage path is not considered.

Best regards
-marc
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages