You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thorsten Heit <th...@gmx.de> on 2007/03/01 15:02:34 UTC

[m2.0.5] Problems getting "mvn dependency:unpack" to work

Hi everybody,

when I execute "mvn -e dependency:unpack" this results in a build error:

+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] snapshot de.ukv:maven:1.0-SNAPSHOT: checking for updates from ukv.snapshots
[INFO] Searching repository for plugin with prefix: 'dependency'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building SUKV 2 WAR-AOK
[INFO]    task-segment: [dependency:unpack]
[INFO] ----------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing for 'dependency:unpack'

[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-1:unpack
        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:330)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
        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:597)
        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-1:unpack
        at org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(DefaultPluginManager.java:820)
        at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:582)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:398)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        ... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Mar 01 14:56:25 CET 2007
[INFO] Final Memory: 3M/8M
[INFO] ------------------------------------------------------------------------


although I have the following configuration in my POM (similar to one of the examples listed on the plugin description):

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-dependency-plugin</artifactId>
      <version>2.0-alpha-1</version>
      <executions>
        <execution>
          <id>unpack</id>
          <phase>package</phase>
          <goals>
            <goal>unpack</goal>
          </goals>
          <configuration>
            <artifactItems>
              <artifactItem>
                <groupId>myModule</groupId>
                <artifactId>myArtifactId</artifactId>
                <version>1.0-SNAPSHOT</version>
		<type>jar</type>
                <overWrite>false</overWrite>
                <outputDirectory>${project.build.directory}</outputDirectory>
              </artifactItem>
            </artifactItems>
          </configuration>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>


What am I missing here? Or what am I doing wrong?


Cheers

Thorsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: RE: [m2.0.5] Problems getting "mvn dependency:unpack" to work

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Move the configuration from the executions section. For some reason,
when executing from the cli, it doesn't use any execution. 

-----Original Message-----
From: Thorsten Heit [mailto:theit@gmx.de] 
Sent: Thursday, March 01, 2007 9:57 AM
To: Maven Users List
Subject: Re: RE: [m2.0.5] Problems getting "mvn dependency:unpack" to
work

Hi Brian,

> If you are running from the cli, you either need to add configuration 
> to the pom to tell the plugin what to unpack, or maybe you want to use

> the unpack-dependencies goal.

I thought I already added the configuration as I wrote in my former
post...?

*snip*

> although I have the following configuration in my POM (similar to one 
> of the examples listed on the plugin description):
> 
> <build>
>   <plugins>
>     <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-dependency-plugin</artifactId>
>       <version>2.0-alpha-1</version>
>       <executions>
>         <execution>
>           <id>unpack</id>
>           <phase>package</phase>
>           <goals>
>             <goal>unpack</goal>
>           </goals>
>           <configuration>
>             <artifactItems>
>               <artifactItem>
>                 <groupId>myModule</groupId>
>                 <artifactId>myArtifactId</artifactId>
>                 <version>1.0-SNAPSHOT</version>
> 		<type>jar</type>
>                 <overWrite>false</overWrite>
>  
> <outputDirectory>${project.build.directory}</outputDirectory>
>               </artifactItem>
>             </artifactItems>
>           </configuration>
>         </execution>
>       </executions>
>     </plugin>
>   </plugins>
> </build>

Can you tell me what I'm doing wrong here?


Regards

Thorsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: RE: [m2.0.5] Problems getting "mvn dependency:unpack" to work

Posted by Thorsten Heit <th...@gmx.de>.
Hi Brian,

> If you are running from the cli, you either need to add configuration to
> the pom to tell the plugin what to unpack, or maybe you want to use the
> unpack-dependencies goal. 

I thought I already added the configuration as I wrote in my former post...?

*snip*

> although I have the following configuration in my POM (similar to one of
> the examples listed on the plugin description):
> 
> <build>
>   <plugins>
>     <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-dependency-plugin</artifactId>
>       <version>2.0-alpha-1</version>
>       <executions>
>         <execution>
>           <id>unpack</id>
>           <phase>package</phase>
>           <goals>
>             <goal>unpack</goal>
>           </goals>
>           <configuration>
>             <artifactItems>
>               <artifactItem>
>                 <groupId>myModule</groupId>
>                 <artifactId>myArtifactId</artifactId>
>                 <version>1.0-SNAPSHOT</version>
> 		<type>jar</type>
>                 <overWrite>false</overWrite>
>  
> <outputDirectory>${project.build.directory}</outputDirectory>
>               </artifactItem>
>             </artifactItems>
>           </configuration>
>         </execution>
>       </executions>
>     </plugin>
>   </plugins>
> </build>

Can you tell me what I'm doing wrong here?


Regards

Thorsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: [m2.0.5] Problems getting "mvn dependency:unpack" to work

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Dependency:unpack isn't meant to be executed on the cli. See here for
examples:
http://maven.apache.org/plugins/maven-dependency-plugin/usage.html

If you are running from the cli, you either need to add configuration to
the pom to tell the plugin what to unpack, or maybe you want to use the
unpack-dependencies goal. 

-----Original Message-----
From: Thorsten Heit [mailto:theit@gmx.de] 
Sent: Thursday, March 01, 2007 9:03 AM
To: Maven Users List
Subject: [m2.0.5] Problems getting "mvn dependency:unpack" to work

Hi everybody,

when I execute "mvn -e dependency:unpack" this results in a build error:

+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] snapshot de.ukv:maven:1.0-SNAPSHOT: checking for updates from
ukv.snapshots [INFO] Searching repository for plugin with prefix:
'dependency'.
[INFO]
------------------------------------------------------------------------
----
[INFO] Building SUKV 2 WAR-AOK
[INFO]    task-segment: [dependency:unpack]
[INFO]
------------------------------------------------------------------------
----
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing for
'dependency:unpack'

[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-1:unpack
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:568)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:493)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:463)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:143)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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-1:unpack
        at
org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(Def
aultPluginManager.java:820)
        at
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPl
uginManager.java:582)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:398)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:539)
        ... 16 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Mar 01 14:56:25 CET 2007 [INFO] Final Memory:
3M/8M [INFO]
------------------------------------------------------------------------


although I have the following configuration in my POM (similar to one of
the examples listed on the plugin description):

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-dependency-plugin</artifactId>
      <version>2.0-alpha-1</version>
      <executions>
        <execution>
          <id>unpack</id>
          <phase>package</phase>
          <goals>
            <goal>unpack</goal>
          </goals>
          <configuration>
            <artifactItems>
              <artifactItem>
                <groupId>myModule</groupId>
                <artifactId>myArtifactId</artifactId>
                <version>1.0-SNAPSHOT</version>
		<type>jar</type>
                <overWrite>false</overWrite>
 
<outputDirectory>${project.build.directory}</outputDirectory>
              </artifactItem>
            </artifactItems>
          </configuration>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>


What am I missing here? Or what am I doing wrong?


Cheers

Thorsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org