I've run into this too. I inferred that the dependency plugin's unpack-dependencies goal was simply not written in a way that allows it to be executed twice in the same project. I can see how that could happen, if one were not pretty careful in the execute() method about making the scratchpad controlling the scratchpad. I resorted to splitting up Maven projects so that there's no more than one unpack-dependencies per pom. But I too would love a better solution.
Actually, the situation could be a bit worse than I portray it above, if Maven itself does not handle multiple executions by making separate calls to execute, with a different set of instantiated parameters each time. But I hope it does. -- Bryan -----Original Message----- From: David Hoffer [mailto:dhoff...@gmail.com] Sent: Wednesday, April 01, 2009 8:42 PM To: users@maven.apache.org Subject: How to use maven-dependency-plugin to unpack-dependencies for 2 artifacts? I'm having problems figuring out how to configure the maven-dependency-plugin to unpack 2 separate dependencies. I have 3 executions, the first uses the copy-dependencies goal to copy a swf artifact, this seems to work. Then I have two executions each using unpack-dependencies goal; the first unpacks some flex config files and the second unpacks a spring configuration file. Here is my pom: <executions> <execution> <id>copy-swf</id> <phase>process-classes</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/${project.build.finalName}</ outputDirectory> <includeArtifacIds>cdf-as-client-testapp</includeArtifacIds> <includeTypes>swf</includeTypes> <overWrite>true</overWrite> </configuration> </execution> <execution> <id>unpack-config</id> <goals> <goal>unpack-dependencies</goal> </goals> <phase>package</phase> <configuration> <outputDirectory>${project.build.directory}/${project.build.finalName}/W EB-INF/flex </outputDirectory> <includeArtifacIds>cdf-blaze-svcs-config</includeArtifacIds> <excludeTransitive>true</excludeTransitive> <excludeTypes>jar,swf,pom</excludeTypes> <overWriteReleases>true</overWriteReleases> <overWriteSnapshots>true</overWriteSnapshots> </configuration> </execution> <execution> <id>unpack-spring-config</id> <goals> <goal>unpack-dependencies</goal> </goals> <phase>package</phase> <configuration> <outputDirectory>${project.build.directory}/${project.build.finalName}/W EB-INF/spring </outputDirectory> <includeArtifacIds>cdf-spring-directbroker-config</includeArtifacIds> <excludeTransitive>true</excludeTransitive> <excludeTypes>jar,swf,pom</excludeTypes> <overWriteReleases>true</overWriteReleases> <overWriteSnapshots>true</overWriteSnapshots> </configuration> </execution> </executions> The problem is that the output folders /WEB-INF/flex & /WEB-INF/spring BOTH contain the same contents, i.e. they BOTH contain what is supposed to be only in flex and only in spring. Furthermore BOTH contain some content not from either artifact!?! This unexpected content seems to be some flex content which I have no idea why it is adding. How can I use maven-dependency-plugin to just unpack one artifact and put it in a separate folder? -Dave --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org