[ 
https://jira.codehaus.org/browse/MOJO-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ian Robertson updated MOJO-1731:
--------------------------------

    Attachment: mojo-1744.it.2.patch

I'm attaching a more reusable fix to the mojo-1744 integration test. It should 
replace majo-1744.it.patch.

> 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
>            Assignee: Robert Scholte
>             Fix For: extra-enforcer-rules-1.0-alpha-2
>
>         Attachments: mojo-1744.it.2.patch, mojo-1744-it.patch, 
> 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


Reply via email to