BanDuplicateClasses fails when there is a dependency of type pom
----------------------------------------------------------------
Key: MOJO-1731
URL: https://jira.codehaus.org/browse/MOJO-1731
Project: Mojo
Issue Type: Bug
Components: extra-enforcer-rules
Reporter: Paul Vonnahme
Attachments: pom_dependency_fix.patch
It tries to unzip all dependencies, and since a pom dependency isn't a zip
file, it fails.
{noformat}
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:99)
at
org.apache.maven.plugins.enforcer.BanDuplicateClasses.execute(BanDuplicateClasses.java:151)
... 22 more
{noformat}
This is a one line fix; I've attached a patch with a test case.
The only thing I'm not sure of is if there would be a constant in the maven API
somewhere I could have used such as !ArtifactType.POM.equals(o.getType())
instead of using the actual string "pom" like I did: !"pom".equals(o.getType())
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email