You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Olivier Lamy (*$^¨%`£ JIRA)" <ji...@apache.org> on 2013/10/01 14:07:25 UTC
[jira] [Commented] (MTOMCAT-240) Artifacts with same artifactID but
different groupID are skipped
[ https://issues.apache.org/jira/browse/MTOMCAT-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13782855#comment-13782855 ]
Olivier Lamy (*$^¨%`£) commented on MTOMCAT-240:
------------------------------------------------
I wonder if more than one jars have the same how does it when the files are packaged in WEB-INF/lib ?
> 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org