Comprehensive answer to this question: Yes
This is a bit complicated, and you need to be careful as pom will not correspond. Thus, only the remote maven repository (artifactory or nexus) puts it in the correct folder structure.
If you write the deployment target to the maven deployment target, you can overwrite the options: http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
One example that will always send version 4.5.1 to nexus would look like this:
<plugin> <artifactId>maven-deploy-plugin</artifactId> <executions> <execution> <goals> <goal>deploy-file</goal> </goals> <phase>deploy</phase> <configuration> <repositoryId>nexus-site</repositoryId> <url>http://nexus.some.where/nexus-2/content/repositories/releases</url> <file>${build.directory}/${project.build.finalName}.${project.packaging}</file> <generatePom>false</generatePom> <pomFile>pom.xml</pomFile> <version>4.5.1</version> </configuration> </execution> </executions> </plugin>
(and before someone asks, one of the reasons to do something like this is to make assemblies more friendly to CI. In CI, everything is just an assembly number, in fact there is no โrelease buildโ, each checkin gives performance So, replacing 4.5.1 with ${BUILD_NUMBER} will leave you with many releases in your artifact repository ...)
mglauche
source share