maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Burton <bur...@spinn3r.com>
Subject assembly plugin dependencySet not factoring in exclusions in my dependencies.
Date Sun, 05 Apr 2015 20:40:38 GMT
I have some issues with dependency conflicts in my dependencies section in
my pom.

I need to have a way to compute a directory of .jar files for use with
creating debian packages

I’ve been using the assembly package do this this via:

    <dependencySets>
        <dependencySet>
            <outputDirectory>lib</outputDirectory>
            <useProjectArtifact>true</useProjectArtifact>
            <scope>runtime</scope>
        </dependencySet>
    </dependencySets>

… this build a directory of .jar files I can use.

The problem is that one of my dependencies pulled in an optional .jar which
has conflicting dependencies on OLD version of a library we use.

So I have this:

        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-leveldb-store</artifactId>
            <version>${activemq.version}</version>

            <exclusions>
                <exclusion>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>

        </dependency>

… which specifies an inclusion to not fetch this older dependency.

and if I do a dependency:tree it shows that it’s properly excluded.

BUT , once I try to run the assembly, that’s ignored and all the transitive
dependencies are pulled in.

This breaks my class path and my app now breaks because it tries to load
old versions of classes.

Any advice here?  Maybe there’s a better way to build the .jar directory
instead of the assembly plugin?

-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message