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
Post a Comment