Copy the latest version of an artifact from a Maven repository -


i trying copy war file company's nexus repository specific location. using maven-dependency-plugin in 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 trying use <version>release</version> instead of specific version (or no version @ all) in order latest release version (although not best practice, in case safe) - doesnt work. thoughts?

brian fox (who wrote dependency plugin) explained in this answer unpack , copy goals not support ranges (nor latest or release) - didn't implement feature - , suggests use xxx-dependencies goals instead.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -