It must be something with the environment because I took your snippet, added it to a pom and ran with no trouble:
Pom: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>a</artifactId> <groupId>a</groupId> <version>1</version> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.0-alpha-4</version> <configuration> <artifactItems> <artifactItem> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <type>jar</type> </artifactItem> </artifactItems> <outputDirectory>${project.build.directory}/dependencies</outputDirectory> </configuration> </plugin> </plugins> </build> </project> Output: E:\svn\Maven\New Folder>mvn dependency:copy [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'dependency'. [INFO] ---------------------------------------------------------------------------- [INFO] Building Unnamed - a:a:jar:1 [INFO] task-segment: [dependency:copy] [INFO] ---------------------------------------------------------------------------- [INFO] [dependency:copy] [INFO] Configured Artifact: junit:junit:3.8.1:jar [INFO] junit:junit:3.8.1:jar already exists in E:\svn\Maven\New Folder\target\dependencies [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Tue Apr 17 12:15:36 PDT 2007 [INFO] Final Memory: 4M/8M [INFO] ------------------------------------------------------------------------ -----Original Message----- From: Herve Chang [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 17, 2007 10:28 AM To: Maven Users List Subject: Re: Error in maven-dependency:copy Allright then, this is what i'm doing so far... If I type dependency:copy, I get this error: What's missing then ? [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'dependency'. [INFO] ---------------------------------------------------------------------------- [INFO] Building Amui Server [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] ------------------------------------------------------------------------ Brian E. Fox a écrit : > Ok and this should work if you type mvn dependency:copy or mvn > dependency:unpack. It's not bound to a phase in the pom so it won't run > automatically. > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 17, 2007 8:45 AM > To: Maven Users List > Subject: Re: Error in maven-dependency:copy > > Here it is: > > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-dependency-plugin</artifactId> > <version>2.0-alpha-4</version> > <configuration> > <artifactItems> > <artifactItem> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>3.8.1</version> > <type>jar</type> > </artifactItem> > </artifactItems> > > <outputDirectory>${project.build.directory}/dependencies</outputDirectory> > </configuration> > </plugin> > > Hervé > > Brian E. Fox a écrit : >> It means it can't find the artifactsItems from the config. Can you post your >> pom (or at least the plugin part)? >> >> -----Original Message----- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, April 17, 2007 4:12 AM >> To: Maven Users List >> Subject: Re: Error in maven-dependency:copy >> >> >> Actually, I'm want to copy artifacts during the package phase and that's >> why I use the <executions> tag...However, both dependency:copy only and >> package execution throw the same error as previously. >> >> Version is clearly 2.0-alpha-4; I just wanted to test copying junit >> artifact and put it into another directory, straightforward the example >> (http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html#Copying%20From%20the%20Command%20Line) >> ...but it still fails... >> >> What does the error message mean ? >> >> [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>. >> >> >> Thanks, >> Hervé >> >> >> 1) Log: >> >> ------------------------------------------------------------------------ >> [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] Trace >> org.apache.maven.lifecycle.LifecycleExecutionException: Error >> configuring: org.apache.maven.plugins:maven-dependency-plugin. Reason: >> Invalid or missing parameters: [Mojo parameter [name: 'artifactItems'; >> alias: 'null']] for mojo: >> org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-4:copy >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:568) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) >> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) >> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) >> at org.apache.maven.cli.MavenCli.main(MavenCli.java:272) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:585) >> at >> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) >> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) >> at >> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) >> at org.codehaus.classworlds.Launcher.main(Launcher.java:375) >> Caused by: org.apache.maven.plugin.PluginParameterException: Error >> configuring: org.apache.maven.plugins:maven-dependency-plugin. Reason: >> Invalid or missing parameters: [Mojo parameter [name: 'artifactItems'; >> alias: 'null']] for mojo: >> org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-4:copy >> at >> org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(DefaultPluginManager.java:907) >> at >> org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:612) >> at >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:421) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) >> ... 16 more >> [INFO] >> ------------------------------------------------------------------------ >> >> 2) pom.xml: >> >> <plugin> >> <groupId>org.apache.maven.plugins</groupId> >> <artifactId>maven-dependency-plugin</artifactId> >> <version>2.0-alpha-4</version> >> <configuration> >> <artifactItems> >> <artifactItem> >> <groupId>junit</groupId> >> <artifactId>junit</artifactId> >> <version>3.8.1</version> >> <type>jar</type> >> </artifactItem> >> </artifactItems> >> >> <outputDirectory>${project.build.directory}/dependencies</outputDirectory> >> </configuration> >> </plugin> >> >> >> >> >> >> Brian E. Fox a écrit : >>> You're making progress. The message now says maven-dependency-plugin not >>> dependency-maven-plugin like your first error. I suspect that your problem >>> is now the same as described in the faq: >>> http://maven.apache.org/plugins/maven-dependency-plugin/faq.html >>> Specifically, you must remove your configuration of the artifactItems from >>> the <executions> tag. (the faq has a link to the proper configuration >>> sample) >>> >>> -----Original Message----- >>> From: Herve Chang [mailto:[EMAIL PROTECTED] >>> Sent: Monday, April 16, 2007 10:38 AM >>> To: Maven Users List; Brian E. Fox >>> Subject: Re: Error in maven-dependency:copy >>> >>> Hello Brian, >>> >>> Thanks for helping but the problem still remains... >>> >>> I've removed: >>> - all metadata files in /org/codehaus/mojo of my local repository , >>> - maven-dependency-plugin and dependency-maven-plugin directories in >>> /org/codehaus/mojo >>> - and also \org\apache\maven\plugins\maven-dependency-plugin >>> >>> I'm also using maven-dependency-plugin version 2.0-alpha-4 as stated in >>> my pom.xml and the error message below. >>> >>> Do you have any others idea? >>> >>> PS: I can't find any 2.0.7 version of maven-dependency-plugin, what do >>> you mean by 2.0.7 ? Am I misunderstanding sth. about the management of >>> this plugin version ? >>> >>> Thanks, >>> Hervé >>> >>> >>> >>> [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] Trace >>> org.apache.maven.lifecycle.LifecycleExecutionException: Error >>> configuring: org.apache.maven.plugins:maven-dependency-plugin. Reason: >>> Invalid or missing parameters: [Mojo parameter [name: 'artifactItems'; >>> alias: 'null']] for mojo: >>> org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-4:copy >>> at >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:568) >>> at >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) >>> at >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) >>> at >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) >>> at >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) >>> at >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) >>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) >>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) >>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:272) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:585) >>> at >>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) >>> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) >>> at >>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) >>> at org.codehaus.classworlds.Launcher.main(Launcher.java:375) >>> Caused by: org.apache.maven.plugin.PluginParameterException: Error >>> configuring: org.apache.maven.plugins:maven-dependency-plugin. Reason: >>> Invalid or missing parameters: [Mojo parameter [name: 'artifactItems'; >>> alias: 'null']] for mojo: >>> org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-4:copy >>> at >>> org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(DefaultPluginManager.java:907) >>> at >>> org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:612) >>> at >>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:421) >>> at >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) >>> ... 16 more >>> [INFO] >>> ------------------------------------------------------------------------ >>> >>> >>> >>> >>> >>> Brian E. Fox a écrit : >>>> Somehow you are getting the old dependency-maven-plugin instead of the >>>> maven-dependency-plugin. Clear the /org/codehaus/mojo metadata from your >>>> local repo (and any internal proxies you have) and try again. This is >>>> already fixed for 2.0.7....doesn't help you now though ;-) >>>> >>>> -----Original Message----- >>>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >>>> Sent: Monday, April 16, 2007 4:08 AM >>>> To: users@maven.apache.org >>>> Subject: Error in maven-dependency:copy >>>> >>>> Hello, >>>> >>>> I'm trying to copy some specific artifacts using the >>>> maven-dependency-plugin (copy goal). However, it seems that the plugin >>>> does not to find some required parameters. >>>> >>>> I'm doing sth very simple and straightforward from what I've read from >>>> http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html >>>> but it simply does not work... >>>> >>>> Error log & plugin usage are just below, >>>> Am I missing something or are there any bugs in the plugin ? >>>> >>>> Thanks, >>>> Hervé >>>> >>>> => Error log: >>>> >>>> [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: 'dependency-maven-plugin'specify >>>> the following: >>>> >>>> <configuration> >>>> ... >>>> <artifactItems>VALUE</artifactItems> >>>> </configuration>. >>>> >>>> [INFO] >>>> ------------------------------------------------------------------------ >>>> >>>> => Usage of this plugin in my pom.xml: >>>> >>>> <plugin> >>>> <groupId>org.apache.maven.plugins</groupdId> >>>> <artifactId>maven-dependency-plugin</artifactId> >>>> <version>2.0-alpha-4</version> >>>> <configuration> >>>> <artifactItems> >>>> <artifactItem> >>>> <groupId>junit</groupId> >>>> <artifactId>junit</artifactId> >>>> <version>3.8.1</version> >>>> <type>jar</type> >>>> </artifactItem> >>>> </artifactItems> >>>> <outputDirectory>${project.build.directory}/dependencies</outputDirectory> >>>> </configuration> >>>> </plugin> >>>> >>>> --------------------------------------------------------------------- >>>> 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] >>> --------------------------------------------------------------------- >>> 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] >> --------------------------------------------------------------------- >> 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] > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- 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]