[ https://issues.apache.org/jira/browse/MTOMCAT-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13782870#comment-13782870 ]
Olivier Lamy (*$^¨%`£) commented on MTOMCAT-240: ------------------------------------------------ doh I didn't know war plugin do that. > Artifacts with same artifactID but different groupID are skipped > ---------------------------------------------------------------- > > Key: MTOMCAT-240 > URL: https://issues.apache.org/jira/browse/MTOMCAT-240 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: commons-lib > Affects Versions: 2.1 > Environment: all > Reporter: Petar Tahchiev > Assignee: Olivier Lamy (*$^¨%`£) > Fix For: 2.2 > > Attachments: MTOMCAT-240.patch > > > Hi guys, > I have the following situation: my classpath includes the following artifacts: > 1) artifactA in group com.mygroup > 2) artifactA in group com.myothergroup. > Looking in DefaultClassLoaderEntriesCalculator.java on line 120 we see the > following: > {code} > String fileName = artifact.getFile().getName(); > if ( !fileInClassLoaderEntries.contains( fileName ) ) > { > // add the artifact to the classpath > } > {code} > So in my case both artifacts are resolved as artifactA-1.0-SNAPSHOT.jar so > the second one gets omitted. I have chaged to code to simply include the > categoryID like this: > {code} > String fileName = artifact.getGroupId() + "-" + > artifact.getFile().getName(); > if ( !fileInClassLoaderEntries.contains( fileName ) ) > { > //add to classpath > } > {code} > and it works like a charm. > You can find the patch attached. Please review it and apply. -- This message was sent by Atlassian JIRA (v6.1#6144) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org