maven-dependency-plugin:unpack Error -


i'm trying extract .exe files dependency jar file , put them under ${project.build.directory}/classes/.

but when execute:

mvn clean compile dependency:unpack

i get:

failed execute goal org.apache.maven.plugins:maven-dependency-plugin:2.10:unpack (default-cli) on project simple: either artifact or artifactitems required -> [help 1

i have verified dependencies available in local repository.

in example pom below i've used junit example, no matter dependency list, same error.

pom.xml:

<build>   <pluginmanagement>     <plugins>       <plugin>         <groupid>org.apache.maven.plugins</groupid>         <artifactid>maven-dependency-plugin</artifactid>         <version>2.10</version>         <executions>           <execution>             <id>unpack</id>             <phase>package</phase>             <goals>               <goal>unpack</goal>             </goals>             <configuration>               <artifactitems>                 <artifactitem>                   <groupid>junit</groupid>                   <artifactid>junit</artifactid>                   <version>4.10</version>                   <type>jar</type>                   <overwrite>false</overwrite>   <outputdirectory>${project.build.directory}/classes/externaltools</outputdirectory>                                      <includes>**/*.txt</includes>                 </artifactitem>               </artifactitems>                </configuration>           </execution>         </executions>       </plugin>     </plugins>   </pluginmanagement> </build> 

the issue due cannot use mvn clean compile dependency:unpack , <executions> tags together.

in documentation maven depdendency plugin @ bottom part of page can read:

if intend configure mojo execution on command line using: mvn dependency:unpack must not put configuration inside executions tag. configuration should this:

<project>   [...]   <build>     <plugins>       <plugin>         <groupid>org.apache.maven.plugins</groupid>         <artifactid>maven-dependency-plugin</artifactid>         <version>2.10</version>         <configuration>           <artifactitems>             <artifactitem>               <groupid>[ groupid ]</groupid>               <artifactid>[ artifactid ]</artifactid>               <version>[ version ]</version>               <type>[ packaging ]</type>               <classifier> [classifier - optional] </classifier>               <overwrite>[ true or false ]</overwrite>               <outputdirectory>[ output directory ]</outputdirectory>               <destfilename>[ filename ]</destfilename>               <includes>[ comma separated list of file filters ]</includes>               <excludes>[ comma separated list of file filters ]</excludes>             </artifactitem>           </artifactitems>           <!-- other configurations here -->         </configuration>       </plugin>     </plugins>   </build>   [...] </project> 

i have tried removing <execution> tags , works perfectly!


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -