Re: adds same artifacts(different version)?

2006-12-02 Thread jiangshachina
Hi franz, Thanks in advance. Your instructions have general purpose. I'll check it. a cup of Java, cheers! Sha Jiang franz see wrote: Good day to you, Sha Jiang, Maven2 handles dependencies by searching for versionless artifact keys from the dependency tree and chooses the version which

Re: adds same artifacts(different version)?

2006-12-01 Thread franz see
Good day to you, Sha Jiang, Maven2 handles dependencies by searching for versionless artifact keys from the dependency tree and chooses the version which is closest to the root ( the pom you ran your mvn command on ). Therefore, you cannot depend on two different versions of an artifact. If you

Re: adds same artifacts(different version)?

2006-11-30 Thread jiangshachina
Dear Wayne, I also wish to use the approach you indicated. But in my mind, I cannot exactly set only one artifact(e.g. ehcache-1.1.jar) in exclusion , because only there are groupId and artifaceId for setting. If I use the element, I may exclude all ehcache artifacts(1.1, 1.2.3, ...). That's my

Re: adds same artifacts(different version)?

2006-11-30 Thread Andrius Šabanas
jiangshachina wrote: Dear Wayne, I also wish to use the approach you indicated. But in my mind, I cannot exactly set only one artifact(e.g. ehcache-1.1.jar) in exclusion , because only there are groupId and artifaceId for setting. If I use the element, I may exclude all ehcache artifacts(1.1,

Re: adds same artifacts(different version)?

2006-11-30 Thread Wendy Smoak
On 11/29/06, jiangshachina [EMAIL PROTECTED] wrote: The more I use Maven, the more I think Maven central repository(artifacts) blocks the work of adding transitive dependencies Automatically. Dependency and transitive dependency may don't have good hierarchy. On the aspect, can any body give me

Re: adds same artifacts(different version)?

2006-11-30 Thread jiangshachina
Hello Andrius, Thanks your help very much! Now, I find that I made a mistake in my last post. I really misunderstood Wayne's instructions. I'll try the approach. a cup of Java, cheers! Sha Jiang Andrius Šabanas wrote: jiangshachina wrote: Dear Wayne, I also wish to use the approach you

Re: adds same artifacts(different version)?

2006-11-29 Thread Wendy Smoak
On 11/29/06, jiangshachina [EMAIL PROTECTED] wrote: I have a Web project. I declare ehcache-1.2.3.jar as dependency. But ehcache-1.1.jar is transitive dependency of one of my directly dependency(acegi-security-1.0.2.jar). Then I run mvn clean package, the two jar files are all in WEB-INF/lib.

Re: adds same artifacts(different version)?

2006-11-29 Thread jiangshachina
Hi Wendy, You are right. My declaration, dependency groupIdnet.sf.ehcache/groupId artifactIdehcache/artifactId version1.2.3/version /dependency But acegi-security-parent(I'm using acegi-security-1.0.2.jar) sets the following, dependency groupIdnet.sf.ehcache/groupId

Re: adds same artifacts(different version)?

2006-11-29 Thread jiangshachina
Oh, Sorry, I made a mistake, acegi-security-parent declaration is the following dependency groupIdehcache/groupId artifactIdehcache/artifactId version1.1/version optionaltrue/optional /dependency a cup of Java, cheers! Sha Jiang jiangshachina wrote: Hi Wendy, You are

Re: adds same artifacts(different version)?

2006-11-29 Thread Wayne Fay
There is no shortcut per se. You need to find each such situation and explicitly exclude the old/invalid artifact and explicitly add the proper/new artifact to your dependency list. Alternatively since it sounds like you are already changing poms in your repo (not generally a good idea imo), you

Re: adds same artifacts(different version)?

2006-11-29 Thread jiangshachina
Hello, The more I use Maven, the more I think Maven central repository(artifacts) blocks the work of adding transitive dependencies Automatically. Dependency and transitive dependency may don't have good hierarchy. On the aspect, can any body give me some experience? Thanks in advance! a cup of

Re: adds same artifacts(different version)?

2006-11-29 Thread jiangshachina
Hi Wayne, This time, I used plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0.1/version configuration warSourceExcludesWEB-INF/lib/some.jar/warSourceExcludes /configuration /plugin to excludes the jar files by hard way.

Re: adds same artifacts(different version)?

2006-11-29 Thread Wayne Fay
You can certainly use warSourceExcludes but I was actually suggesting that you use the /dependencies/dependency/exclusions/exclusion node. This is how I handle these types of issues. Wayne On 11/30/06, jiangshachina [EMAIL PROTECTED] wrote: Hi Wayne, This time, I used plugin