tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petar Tahchiev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MTOMCAT-240) Artifacts with same artifactID but different groupID are skipped
Date Tue, 01 Oct 2013 12:28:24 GMT

    [ https://issues.apache.org/jira/browse/MTOMCAT-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13782866#comment-13782866
] 

Petar Tahchiev commented on MTOMCAT-240:
----------------------------------------

It copies both, but changes their names (prepends the groupId). In WEB-INF/lib I see:
{code}
com.xxxxx.foo-core-0.6-SNAPSHOT.jar
com.yyyyyyy.bar-core-0.6-SNAPSHOT.jar
{code}

> 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


Mime
View raw message