You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Max Bowsher <ma...@mxtelecom.com> on 2006/09/04 12:32:07 UTC
How to override jar-plugin dependencies to use a custom version of
maven-archiver?
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.
--
Max Bowsher <ma...@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
Re: How to override jar-plugin dependencies to use a custom version
of maven-archiver?
Posted by Max Bowsher <ma...@mxtelecom.com>.
> 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 <ma...@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
Re: How to override jar-plugin dependencies to use a custom version of maven-archiver?
Posted by Jason Dillon <ja...@planet57.com>.
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.
--jason
On Sep 4, 2006, at 3:32 AM, 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.
>
> --
> Max Bowsher <ma...@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