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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.0.1</version> <configuration> <warSourceExcludes>WEB-INF/lib/some.jar</warSourceExcludes> </configuration> </plugin> to excludes the jar files by hard way. > Alternatively since it sounds like you are already changing poms in > your repo (not generally a good idea imo) I agree with you, so finally, I don't use the approach. a cup of Java, cheers! Sha Jiang Wayne Fay wrote: > > 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 could just change the > dependency directly in the associated project pom files. Then when you > simply refer to acegi, it will pull in the newer ehcache directly. > > Wayne > > On 11/29/06, jiangshachina <[EMAIL PROTECTED]> wrote: >> >> Oh, >> Sorry, I made a mistake, >> acegi-security-parent declaration is the following >> <dependency> >> <groupId>ehcache</groupId> >> <artifactId>ehcache</artifactId> >> <version>1.1</version> >> <optional>true</optional> >> </dependency> >> >> >> a cup of Java, cheers! >> Sha Jiang >> >> >> jiangshachina wrote: >> > >> > Hi Wendy, >> > You are right. >> > My declaration, >> > <dependency> >> > <groupId>net.sf.ehcache</groupId> >> > <artifactId>ehcache</artifactId> >> > <version>1.2.3</version> >> > </dependency> >> > >> > But acegi-security-parent(I'm using acegi-security-1.0.2.jar) sets the >> > following, >> > <dependency> >> > <groupId>net.sf.ehcache</groupId> >> > <artifactId>ehcache</artifactId> >> > <version>1.1</version> >> > <optional>true</optional> >> > </dependency> >> > May there are many similar cases, how can I cancel the trouble? >> > >> > Thanks in advance! >> > >> > a cup of Java, cheers! >> > Sha Jiang >> > >> > >> > Wendy Smoak-3 wrote: >> >> >> >> 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. >> >>> How to resolve the problem? >> >> >> >> When you say you declare a dependency, we need to see the whole thing: >> >> groupId, artifactId, and version. >> >> >> >> My guess is that your EHCache jars are coming from two different >> >> groupIds, so Maven can't figure out that they are the same. >> >> >> >> http://repo1.maven.org/maven2/net/sf/ehcache/ehcache/ >> >> http://repo1.maven.org/maven2/ehcache/ehcache/ >> >> >> >> The output of "mvn clean install -X" should help you figure out where >> >> each one is coming from. >> >> >> >> -- >> >> Wendy >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/adds-same-artifacts%28different-version%29--tf2729513s177.html#a7613552 >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/adds-same-artifacts%28different-version%29--tf2729513s177.html#a7614503 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]