You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Amit Prahesh <am...@gmail.com> on 2007/06/23 17:31:11 UTC

Depedency inconvenience

Hello,

I'm using the Spring Framework in my web application, having declared
it in my pom's dependecies like this:

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring</artifactId>
      <version>2.0.6</version>
    </dependency>

Everything's fine. When I issue a mvn package things go smoothly and
everything goes as advertised. Now, I wanted to add Acegi Security to
the mix, so I added this as yet another dependency:

    <dependency>
      <groupId>org.acegisecurity</groupId>
      <artifactId>acegi-security</artifactId>
      <version>1.0.4</version>
    </dependency>

It seems that this specific version (which I gather is the latest one)
depends on Spring version 2.0.4. Now, when I package my app it will
include some jars for this version, so I end up packaging Spring
Framework 2.0.6 AND 2.0.4.

My question is this: is there a way for me to tell Acegi not to worry
about the 'old' Spring version? Is this something the Acegi 'packager'
should fix?

Thanks a lot,
Amit.

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


RE: Plugin downloads

Posted by "Alok, Niraj" <ni...@gs.com>.
It seems the problem is limited to only those artifacts that don't have
a metadata.xml.
How is this possible when all the artifacts are uploaded to the
repository through a common process ?
In this cases, how do we generate the missing metadata file ? 

-----Original Message-----
From: Alok, Niraj 
Sent: Monday, June 25, 2007 5:56 PM
To: 'Maven Users List'
Subject: Plugin downloads

Hi,

Is there some difference in which dependencies are downloaded when
specified as plugin dependencies and when specified as normal pom
dependencies ?

I have a jar, in the remote repo at
niraj.alok.date/0-SNAPSHOT/date-0-20070625.064105-191-sources.jar

In one of my plugins, I am specifying dependency as 

			<dependency>
	
<groupId>niraj.alok</groupId>
	
<artifactId>date</artifactId>
	
<version>0-SNAPSHOT</version>
	
<classifier>sources</classifier>
			</dependency>

On doing a mvn command, it says 
Downloading:
<<remote_repo>>/repository/niraj/alok/date/0-SNAPSHOT/date-0-SNAPSHOT-so
urces.jar
[WARNING] Unable to get resource from repository <<remote_repo>>

The same dependency when moved from the plugin's set to the normal pom,
says this:
Downloading:
<<remote_repo>>/repository/niraj/alok/date/0-SNAPSHOT/date-0-20070625.06
4105-191-sources.jar
14K downloaded

Why is this discrepancy ?

Thanks,
Niraj

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


Plugin downloads

Posted by "Alok, Niraj" <ni...@gs.com>.
Hi,

Is there some difference in which dependencies are downloaded when
specified as plugin dependencies and when specified as normal pom
dependencies ?

I have a jar, in the remote repo at
niraj.alok.date/0-SNAPSHOT/date-0-20070625.064105-191-sources.jar

In one of my plugins, I am specifying dependency as 

			<dependency>
	
<groupId>niraj.alok</groupId>
	
<artifactId>date</artifactId>
	
<version>0-SNAPSHOT</version>
	
<classifier>sources</classifier>
			</dependency>

On doing a mvn command, it says 
Downloading:
<<remote_repo>>/repository/niraj/alok/date/0-SNAPSHOT/date-0-SNAPSHOT-so
urces.jar
[WARNING] Unable to get resource from repository <<remote_repo>>

The same dependency when moved from the plugin's set to the normal pom,
says this:
Downloading:
<<remote_repo>>/repository/niraj/alok/date/0-SNAPSHOT/date-0-20070625.06
4105-191-sources.jar
14K downloaded

Why is this discrepancy ?

Thanks,
Niraj

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


Re: Depedency inconvenience

Posted by Jonas Thurfors <jo...@eniro.com>.
Hi Amit,

You can use dependency exclusions [1,2].

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring</artifactId>
  <version>2.0.6</version>
</dependency>

<dependency>
  <groupId>org.acegisecurity</groupId>
  <artifactId>acegi-security</artifactId>
  <version>1.0.4</version>
  <exclusions>
    <exclusion>
      <groupId>org.springframework</groupId>
      <artifactId>spring</artifactId>
    </exclusion>
  </exclusions>
</dependency>

Regards,
Jonas

[1]
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
[2]
http://www.sonatype.com/book/pom-relationships.html#project_relationships


On Sat, 2007-06-23 at 11:31 -0400, Amit Prahesh wrote:
> Hello,
> 
> I'm using the Spring Framework in my web application, having declared
> it in my pom's dependecies like this:
> 
>     <dependency>
>       <groupId>org.springframework</groupId>
>       <artifactId>spring</artifactId>
>       <version>2.0.6</version>
>     </dependency>
> 
> Everything's fine. When I issue a mvn package things go smoothly and
> everything goes as advertised. Now, I wanted to add Acegi Security to
> the mix, so I added this as yet another dependency:
> 
>     <dependency>
>       <groupId>org.acegisecurity</groupId>
>       <artifactId>acegi-security</artifactId>
>       <version>1.0.4</version>
>     </dependency>
> 
> It seems that this specific version (which I gather is the latest one)
> depends on Spring version 2.0.4. Now, when I package my app it will
> include some jars for this version, so I end up packaging Spring
> Framework 2.0.6 AND 2.0.4.
> 
> My question is this: is there a way for me to tell Acegi not to worry
> about the 'old' Spring version? Is this something the Acegi 'packager'
> should fix?
> 
> Thanks a lot,
> Amit.
> 
> ---------------------------------------------------------------------
> 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