views:

30

answers:

1

Hi All,

I am trying to copy a war file from my company's Nexus repository to a specific location. I am using maven-dependency-plugin in the following way:

    <plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-dependency-plugin</artifactId>
  <version>2.1</version>
  <executions>
   <execution>
    <id>copy-to-output</id>
    <phase>prepare-package</phase>
    <goals>
     <goal>copy</goal>
    </goals>
   </execution>
  </executions>
  <configuration>
           <artifactItems>
             <artifactItem>
               <groupId>com.mycompany</groupId>
               <artifactId>myproduct</artifactId>
               <version>2.3.0</version>
               <type>war</type>
               <overWrite>false</overWrite>
             </artifactItem>
           </artifactItems>
           <outputDirectory>${basedir}/src/main/output</outputDirectory>
         </configuration>
 </plugin>

The problem arise when I am trying to use RELEASE instead of a specific version (or no version at all) in order to get the latest release version (although not best practice, in this case it is safe) - it doesnt work. any thoughts?

+1  A: 

Brian Fox (who wrote the dependency plugin) explained in this answer that the unpack and copy goals do NOT support ranges (nor the LATEST or RELEASE) - he didn't implement this feature - and suggests to use the xxx-dependencies goals instead.

Pascal Thivent