activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-5009) Switch activemq-all from shaded jar to pom dependency aggregator
Date Wed, 10 Dec 2014 16:23:12 GMT

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

Gary Tully commented on AMQ-5009:
---------------------------------

i updated the release page - the point of the single -all jar is just ease of use. But there
is a maven ease of use and ease of exclusion use case for sure - maybe we can have both the
-all.pom and the artifact. Is that possible?

> Switch activemq-all from shaded jar to pom dependency aggregator
> ----------------------------------------------------------------
>
>                 Key: AMQ-5009
>                 URL: https://issues.apache.org/jira/browse/AMQ-5009
>             Project: ActiveMQ
>          Issue Type: Improvement
>    Affects Versions: 5.9.0
>            Reporter: Michael O'Cleirigh
>              Labels: patch
>             Fix For: 5.11.0
>
>         Attachments: on-trunk-AMQ-5009-switch-to-pom-based-dependency-aggregation-.patch,
on-v5.9.0-AMQ-5009-switch-to-pom-based-dependency-aggregation-.patch
>
>
> I encountered an issue when adding a dependency on activemq-all into my project; it caused
a collision with our existing dependency on *slf4j-log4j12*
> {code}
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in [jar:file:/root/.m2/repository/org/slf4j/slf4j-log4j12/1.6.2/slf4j-log4j12-1.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/root/.m2/repository/org/apache/activemq/activemq-all/5.9.0/activemq-all-5.9.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
> {code}
> The main issue is that because the activemq-all jar is shaded there is no way for us
to use maven dependency *exclusions* command to not take the activemq-all contributed *slf4j-log4j12*
artifact.
> There is a straight forward fix to this issue.  
> Switch from using the *maven-shade-plugin* to using a pom dependency which aggregates
the activemq dependencies in a maven controllable way. 
> By making the packaging of the *activemq-all* artifact pom it means that when it is included
in a project only the transitive dependencies that it declares are included, the pom artifact
itself is not.
> I've tested that this works in our project that depends on activemq-all 5.9.0 and also
have a patch prepared against the current 5.10-SNAPSHOT trunk.
> The only difference to the consumer of the activemq-all artifact is that they have to
specify the *<type>* as pom.
> For example:
> {code}
> <dependency>
>     <groupId>org.apache.activemq</groupId>
>     <artifactId>activemq-all</artifactId>
>     <version>5.9.0</version>
>     <type>pom</type>
> </dependency>
> {code}
> The Apache Wicket project uses the same approach, see [here|http://repo1.maven.org/maven2/org/apache/wicket/wicket/6.13.0/wicket-6.13.0.pom]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message