You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Dennis Lundberg <de...@apache.org> on 2007/12/28 18:55:52 UTC

How to handle plexus-container-default and plexus-components-api dependencies in a shared component?

Hi

I'm going through the dependencies for shared/maven-archiver. Is a
shared component in danger of dragging in a wrong version of
plexus-container-default or plexus-components-api?

The MavenArchiver class is not a plexus component itself, it doesn't use
plexus directly - only through its dependencies.

Here's the current output of 'mvn dependency:tree':

[INFO] [dependency:tree]
[INFO] org.apache.maven:maven-archiver:jar:2.3-SNAPSHOT
[INFO]    org.apache.maven:maven-artifact:jar:2.0:compile
[INFO]    org.apache.maven:maven-model:jar:2.0:compile
[INFO]    org.apache.maven:maven-project:jar:2.0:compile
[INFO]       org.apache.maven:maven-profile:jar:2.0:compile
[INFO]       org.apache.maven:maven-artifact-manager:jar:2.0:compile
[INFO]          org.apache.maven:maven-repository-metadata:jar:2.0:compile
[INFO]
org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:compile
[INFO]    org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-9:compile
[INFO]       org.codehaus.plexus:plexus-io:jar:1.0-alpha-1:compile
[INFO]
org.codehaus.plexus:plexus-component-api:jar:1.0-alpha-15:compile
[INFO]
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:compile
[INFO]    org.codehaus.plexus:plexus-utils:jar:1.4.9:compile
[INFO]    junit:junit:jar:3.8.1:test


As you can see we have these two chains of transitive dependencies:
1. plexus-archiver -> plexus-io -> plexus-component-api:1.0-alpha-15
2. plexus-archiver -> plexus-io -> plexus-container-default:1.0-alpha-8

Should I exclude plexus-component-api and plexus-container-default in
the plexus-archiver dependency element in the pom of maven-archiver [1]?

If the answer is yes, should I then add a dependency on the version that
we want: plexus-container-default:1.0-alpha-9 ?

[1]
https://svn.apache.org/repos/asf/maven/shared/trunk/maven-archiver/pom.xml

-- 
Dennis Lundberg

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


Re: How to handle plexus-container-default and plexus-components-api dependencies in a shared component?

Posted by Dennis Lundberg <de...@apache.org>.
Thanks Brian.

Brian E. Fox wrote:
> Just exclude the api jar. I had to do this in maven-dependency and I
> setup an enforcer rule to alert me if the jar creeps back in so I can
> stamp it out. Take a look at the mdep pom to see.
> 
> -----Original Message-----
> From: Dennis Lundberg [mailto:dennisl@apache.org] 
> Sent: Friday, December 28, 2007 3:23 PM
> To: Maven Developers List
> Subject: Re: How to handle plexus-container-default and
> plexus-components-api dependencies in a shared component?
> 
> Jason van Zyl wrote:
>> I have eliminated the second JAR from newer versions of Plexus, it was
> a
>> complete disaster separating the two and caused so many problems.
> 
> Yes, I know the story.
> 
>> For your case below can you not used the older version of plexus that
>> was a single JAR? The newer versions of plexus are again a single JAR,
>> but some plexus-utils coupling might block you.
> 
> That's what I'm asking about. Do I need to exclude the transient
> dependencies and add my own version - the old single-jar alpha-9
> version. It's not clear to me under which circumstances having dual jars
> in the class path causes problems.
> 
>> Or (gasp), just write the 30 lines of code to JAR up what you need and
>> toss the whole maven-archive/plexus-archiver chain. I just found chain
>> to be a mess as plexus-archiver is just way too complicated and
>> incredibly slow.
> 
> I'm sure that could be done, haven't even looked at what is in
> plexus-archiver. But all I'm really trying to do here are some release
> preparations and add documentation, not rewrite the code.
> 
>> On 28 Dec 07, at 9:55 AM 28 Dec 07, Dennis Lundberg wrote:
>>
>>> Hi
>>>
>>> I'm going through the dependencies for shared/maven-archiver. Is a
>>> shared component in danger of dragging in a wrong version of
>>> plexus-container-default or plexus-components-api?
>>>
>>> The MavenArchiver class is not a plexus component itself, it doesn't
> use
>>> plexus directly - only through its dependencies.
>>>
>>> Here's the current output of 'mvn dependency:tree':
>>>
>>> [INFO] [dependency:tree]
>>> [INFO] org.apache.maven:maven-archiver:jar:2.3-SNAPSHOT
>>> [INFO]    org.apache.maven:maven-artifact:jar:2.0:compile
>>> [INFO]    org.apache.maven:maven-model:jar:2.0:compile
>>> [INFO]    org.apache.maven:maven-project:jar:2.0:compile
>>> [INFO]       org.apache.maven:maven-profile:jar:2.0:compile
>>> [INFO]       org.apache.maven:maven-artifact-manager:jar:2.0:compile
>>> [INFO]         
>>> org.apache.maven:maven-repository-metadata:jar:2.0:compile
>>> [INFO]
>>> org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:compile
>>> [INFO]    org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-9:compile
>>> [INFO]       org.codehaus.plexus:plexus-io:jar:1.0-alpha-1:compile
>>> [INFO]
>>> org.codehaus.plexus:plexus-component-api:jar:1.0-alpha-15:compile
>>> [INFO]
>>> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:compile
>>> [INFO]    org.codehaus.plexus:plexus-utils:jar:1.4.9:compile
>>> [INFO]    junit:junit:jar:3.8.1:test
>>>
>>>
>>> As you can see we have these two chains of transitive dependencies:
>>> 1. plexus-archiver -> plexus-io -> plexus-component-api:1.0-alpha-15
>>> 2. plexus-archiver -> plexus-io ->
> plexus-container-default:1.0-alpha-8
>>> Should I exclude plexus-component-api and plexus-container-default in
>>> the plexus-archiver dependency element in the pom of maven-archiver
> [1]?
>>> If the answer is yes, should I then add a dependency on the version
> that
>>> we want: plexus-container-default:1.0-alpha-9 ?
>>>
>>> [1]
>>>
> https://svn.apache.org/repos/asf/maven/shared/trunk/maven-archiver/pom.x
> ml
>>>
>>> -- 
>>> Dennis Lundberg
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder,  Apache Maven
>> jason at sonatype dot com
>> ----------------------------------------------------------
>>
>> happiness is like a butterfly: the more you chase it, the more it will
>> elude you, but if you turn your attention to other things, it will
> come
>> and sit softly on your shoulder ...
>>
>> -- Thoreau
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
> 
> 


-- 
Dennis Lundberg

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


RE: How to handle plexus-container-default and plexus-components-api dependencies in a shared component?

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Just exclude the api jar. I had to do this in maven-dependency and I
setup an enforcer rule to alert me if the jar creeps back in so I can
stamp it out. Take a look at the mdep pom to see.

-----Original Message-----
From: Dennis Lundberg [mailto:dennisl@apache.org] 
Sent: Friday, December 28, 2007 3:23 PM
To: Maven Developers List
Subject: Re: How to handle plexus-container-default and
plexus-components-api dependencies in a shared component?

Jason van Zyl wrote:
> I have eliminated the second JAR from newer versions of Plexus, it was
a
> complete disaster separating the two and caused so many problems.

Yes, I know the story.

> For your case below can you not used the older version of plexus that
> was a single JAR? The newer versions of plexus are again a single JAR,
> but some plexus-utils coupling might block you.

That's what I'm asking about. Do I need to exclude the transient
dependencies and add my own version - the old single-jar alpha-9
version. It's not clear to me under which circumstances having dual jars
in the class path causes problems.

> Or (gasp), just write the 30 lines of code to JAR up what you need and
> toss the whole maven-archive/plexus-archiver chain. I just found chain
> to be a mess as plexus-archiver is just way too complicated and
> incredibly slow.

I'm sure that could be done, haven't even looked at what is in
plexus-archiver. But all I'm really trying to do here are some release
preparations and add documentation, not rewrite the code.

> On 28 Dec 07, at 9:55 AM 28 Dec 07, Dennis Lundberg wrote:
> 
>> Hi
>>
>> I'm going through the dependencies for shared/maven-archiver. Is a
>> shared component in danger of dragging in a wrong version of
>> plexus-container-default or plexus-components-api?
>>
>> The MavenArchiver class is not a plexus component itself, it doesn't
use
>> plexus directly - only through its dependencies.
>>
>> Here's the current output of 'mvn dependency:tree':
>>
>> [INFO] [dependency:tree]
>> [INFO] org.apache.maven:maven-archiver:jar:2.3-SNAPSHOT
>> [INFO]    org.apache.maven:maven-artifact:jar:2.0:compile
>> [INFO]    org.apache.maven:maven-model:jar:2.0:compile
>> [INFO]    org.apache.maven:maven-project:jar:2.0:compile
>> [INFO]       org.apache.maven:maven-profile:jar:2.0:compile
>> [INFO]       org.apache.maven:maven-artifact-manager:jar:2.0:compile
>> [INFO]         
>> org.apache.maven:maven-repository-metadata:jar:2.0:compile
>> [INFO]
>> org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:compile
>> [INFO]    org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-9:compile
>> [INFO]       org.codehaus.plexus:plexus-io:jar:1.0-alpha-1:compile
>> [INFO]
>> org.codehaus.plexus:plexus-component-api:jar:1.0-alpha-15:compile
>> [INFO]
>> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:compile
>> [INFO]    org.codehaus.plexus:plexus-utils:jar:1.4.9:compile
>> [INFO]    junit:junit:jar:3.8.1:test
>>
>>
>> As you can see we have these two chains of transitive dependencies:
>> 1. plexus-archiver -> plexus-io -> plexus-component-api:1.0-alpha-15
>> 2. plexus-archiver -> plexus-io ->
plexus-container-default:1.0-alpha-8
>>
>> Should I exclude plexus-component-api and plexus-container-default in
>> the plexus-archiver dependency element in the pom of maven-archiver
[1]?
>>
>> If the answer is yes, should I then add a dependency on the version
that
>> we want: plexus-container-default:1.0-alpha-9 ?
>>
>> [1]
>>
https://svn.apache.org/repos/asf/maven/shared/trunk/maven-archiver/pom.x
ml
>>
>>
>> -- 
>> Dennis Lundberg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
> 
> Thanks,
> 
> Jason
> 
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
> 
> happiness is like a butterfly: the more you chase it, the more it will
> elude you, but if you turn your attention to other things, it will
come
> and sit softly on your shoulder ...
> 
> -- Thoreau
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 


-- 
Dennis Lundberg

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


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


Re: How to handle plexus-container-default and plexus-components-api dependencies in a shared component?

Posted by Dennis Lundberg <de...@apache.org>.
Jason van Zyl wrote:
> I have eliminated the second JAR from newer versions of Plexus, it was a
> complete disaster separating the two and caused so many problems.

Yes, I know the story.

> For your case below can you not used the older version of plexus that
> was a single JAR? The newer versions of plexus are again a single JAR,
> but some plexus-utils coupling might block you.

That's what I'm asking about. Do I need to exclude the transient
dependencies and add my own version - the old single-jar alpha-9
version. It's not clear to me under which circumstances having dual jars
in the class path causes problems.

> Or (gasp), just write the 30 lines of code to JAR up what you need and
> toss the whole maven-archive/plexus-archiver chain. I just found chain
> to be a mess as plexus-archiver is just way too complicated and
> incredibly slow.

I'm sure that could be done, haven't even looked at what is in
plexus-archiver. But all I'm really trying to do here are some release
preparations and add documentation, not rewrite the code.

> On 28 Dec 07, at 9:55 AM 28 Dec 07, Dennis Lundberg wrote:
> 
>> Hi
>>
>> I'm going through the dependencies for shared/maven-archiver. Is a
>> shared component in danger of dragging in a wrong version of
>> plexus-container-default or plexus-components-api?
>>
>> The MavenArchiver class is not a plexus component itself, it doesn't use
>> plexus directly - only through its dependencies.
>>
>> Here's the current output of 'mvn dependency:tree':
>>
>> [INFO] [dependency:tree]
>> [INFO] org.apache.maven:maven-archiver:jar:2.3-SNAPSHOT
>> [INFO]    org.apache.maven:maven-artifact:jar:2.0:compile
>> [INFO]    org.apache.maven:maven-model:jar:2.0:compile
>> [INFO]    org.apache.maven:maven-project:jar:2.0:compile
>> [INFO]       org.apache.maven:maven-profile:jar:2.0:compile
>> [INFO]       org.apache.maven:maven-artifact-manager:jar:2.0:compile
>> [INFO]         
>> org.apache.maven:maven-repository-metadata:jar:2.0:compile
>> [INFO]
>> org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:compile
>> [INFO]    org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-9:compile
>> [INFO]       org.codehaus.plexus:plexus-io:jar:1.0-alpha-1:compile
>> [INFO]
>> org.codehaus.plexus:plexus-component-api:jar:1.0-alpha-15:compile
>> [INFO]
>> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:compile
>> [INFO]    org.codehaus.plexus:plexus-utils:jar:1.4.9:compile
>> [INFO]    junit:junit:jar:3.8.1:test
>>
>>
>> As you can see we have these two chains of transitive dependencies:
>> 1. plexus-archiver -> plexus-io -> plexus-component-api:1.0-alpha-15
>> 2. plexus-archiver -> plexus-io -> plexus-container-default:1.0-alpha-8
>>
>> Should I exclude plexus-component-api and plexus-container-default in
>> the plexus-archiver dependency element in the pom of maven-archiver [1]?
>>
>> If the answer is yes, should I then add a dependency on the version that
>> we want: plexus-container-default:1.0-alpha-9 ?
>>
>> [1]
>> https://svn.apache.org/repos/asf/maven/shared/trunk/maven-archiver/pom.xml
>>
>>
>> -- 
>> Dennis Lundberg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
> 
> Thanks,
> 
> Jason
> 
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
> 
> happiness is like a butterfly: the more you chase it, the more it will
> elude you, but if you turn your attention to other things, it will come
> and sit softly on your shoulder ...
> 
> -- Thoreau
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 


-- 
Dennis Lundberg

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


Re: How to handle plexus-container-default and plexus-components-api dependencies in a shared component?

Posted by Jason van Zyl <ja...@maven.org>.
I have eliminated the second JAR from newer versions of Plexus, it was  
a complete disaster separating the two and caused so many problems.

For your case below can you not used the older version of plexus that  
was a single JAR? The newer versions of plexus are again a single JAR,  
but some plexus-utils coupling might block you.

Or (gasp), just write the 30 lines of code to JAR up what you need and  
toss the whole maven-archive/plexus-archiver chain. I just found chain  
to be a mess as plexus-archiver is just way too complicated and  
incredibly slow.

On 28 Dec 07, at 9:55 AM 28 Dec 07, Dennis Lundberg wrote:

> Hi
>
> I'm going through the dependencies for shared/maven-archiver. Is a
> shared component in danger of dragging in a wrong version of
> plexus-container-default or plexus-components-api?
>
> The MavenArchiver class is not a plexus component itself, it doesn't  
> use
> plexus directly - only through its dependencies.
>
> Here's the current output of 'mvn dependency:tree':
>
> [INFO] [dependency:tree]
> [INFO] org.apache.maven:maven-archiver:jar:2.3-SNAPSHOT
> [INFO]    org.apache.maven:maven-artifact:jar:2.0:compile
> [INFO]    org.apache.maven:maven-model:jar:2.0:compile
> [INFO]    org.apache.maven:maven-project:jar:2.0:compile
> [INFO]       org.apache.maven:maven-profile:jar:2.0:compile
> [INFO]       org.apache.maven:maven-artifact-manager:jar:2.0:compile
> [INFO]          org.apache.maven:maven-repository-metadata:jar: 
> 2.0:compile
> [INFO]
> org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:compile
> [INFO]    org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-9:compile
> [INFO]       org.codehaus.plexus:plexus-io:jar:1.0-alpha-1:compile
> [INFO]
> org.codehaus.plexus:plexus-component-api:jar:1.0-alpha-15:compile
> [INFO]
> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:compile
> [INFO]    org.codehaus.plexus:plexus-utils:jar:1.4.9:compile
> [INFO]    junit:junit:jar:3.8.1:test
>
>
> As you can see we have these two chains of transitive dependencies:
> 1. plexus-archiver -> plexus-io -> plexus-component-api:1.0-alpha-15
> 2. plexus-archiver -> plexus-io -> plexus-container-default:1.0- 
> alpha-8
>
> Should I exclude plexus-component-api and plexus-container-default in
> the plexus-archiver dependency element in the pom of maven-archiver  
> [1]?
>
> If the answer is yes, should I then add a dependency on the version  
> that
> we want: plexus-container-default:1.0-alpha-9 ?
>
> [1]
> https://svn.apache.org/repos/asf/maven/shared/trunk/maven-archiver/pom.xml
>
> -- 
> Dennis Lundberg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...

-- Thoreau 




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