maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lakshman Srilakshmanan" <lakshman.srilakshma...@tradingpost.com.au>
Subject RE: How to override jar-plugin dependencies to use a custom version of maven-archiver?
Date Mon, 04 Sep 2006 23:38:54 GMT
Hi Max,

Page 58, in Better builds with Maven explains how to achieve this.
Essentially you have to do the following.

<dependencies>
    <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-container-default</artifactId>
        <version>1.0-alpha-9</version>
        <exclusions>
            <exclusion>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-utils</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>1.1</version>
        <scope>runtime</scope>
    </dependency>
</dependencies>


Thanks
Lakshman


> -----Original Message-----
> From: Max Bowsher [mailto:maxb@mxtelecom.com]
> Sent: Monday, 4 September 2006 10:06 PM
> To: Maven Users List
> Subject: Re: How to override jar-plugin dependencies to use a custom
version of maven-archiver?
> 
> > Max Bowsher wrote:
> >> Is it possible to use POM elements to configure the standard
> >> maven-jar-plugin to use a custom version of maven-archiver?
> >>
> >> I am attempting to use:
> >>   <build>
> >>     <plugins>
> >>       <plugin>
> >>         <artifactId>maven-jar-plugin</artifactId>
> >>         <dependencies>
> >>           <dependency>
> >>             <artifactId>maven-archiver</artifactId>
> >>             <groupId>org.apache.maven</groupId>
> >>             <version>2.2-maxb-1</version>
> >>             <scope>runtime</scope>
> >>           </dependency>
> >>         </dependencies>
> >>
> >> However, this does not work. The version of maven-archiver
specified
> >> directly in the jar plugin is used instead:
> >>
> >> 'mvn -X package' shows:
> >> [DEBUG]
> >> org.apache.maven.plugins:maven-jar-plugin:maven-plugin:2.1:runtime
> >> (selected for runtime)
> >> ...
> >> [DEBUG]   org.apache.maven:maven-archiver:jar:2.2:runtime (selected
> >> for runtime)
> >> ...
> >> [DEBUG]   org.apache.maven:maven-archiver:jar:2.2-maxb-1:runtime
> >> (removed - nearer found: 2.2)
> >>
> >> Must I make a custom version of the jar plugin too, to convince it
to
> >> use a custom maven-archiver?
> >>
> >> Thanks in advance for any insight.
> 
> 
> Jason Dillon wrote:
> > Not sure that maven can calculate that 2.2-maxb-1 > 2.2.  Try to use
a
> > more standard version... like 2.3-SNAPSHOT, and if you want maxb-1,
then
> > put that in the classifier.
> 
> I tried changing the version to 2.3-SNAPSHOT - no change, *exactly*
the
> same behaviour, just substituting "2.3-SNAPSHOT" for "2.2-maxb-1" in
the
> output.
> 
> Maven's claiming that 2.2 is nearer - not newer.
> 
> 
> --
> Max Bowsher <maxb@mxtelecom.com>
> http://www.mxtelecom.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message