Hi all, I need to use the dependency plugin for two separate tasks in a project. I don't understand how to define multiple executions of a plugin. The relevant portion of my pom.xml and the error message are below.
Also, what is the purpose of the <id> element in an execution? Can I use it from the command line to invoke a specific execution? Thanks for any help. Kevin <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-dependencies</id> <phase>process-resources</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory> ${project.build.directory}/dependencies</outputDirectory> <overWriteReleases>false</overWriteReleases> <overWriteSnapshots>false</overWriteSnapshots> <overWriteIfNewer>true</overWriteIfNewer> <stripVersion>true</stripVersion> </configuration> </execution> <execution> <id>update-server</id> <goals> <goal>copy</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>com.db.abfo</groupId> <artifactId>abfo-webstart-web</ artifactId> <version>${project.version}</version> <overWrite>true</overWrite> <outputDirectory> ${jboss.server.abfo.deploy.dir}</outputDirectory> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> $ mvn dependency:copy [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'dependency'. [INFO] ---------------------------------------------------------------------------- [INFO] Building WebStart Web Application [INFO] task-segment: [dependency:copy] [INFO] ---------------------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] One or more required plugin parameters are invalid/missing for 'dependency:copy' [0] inside the definition for plugin: 'maven-dependency-plugin'specify the following: <configuration> ... <artifactItems>VALUE</artifactItems> </configuration>. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Thu Jun 14 10:12:16 BST 2007 [INFO] Final Memory: 5M/11M [INFO] ------------------------------------------------------------------------ --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.