I have an artefactory repository, and a hudson integration server. These are working well together. For individual artefacts that are external dependencies I can deploy them successfully to the repository with something like this:
mvn deploy:deploy-file -DgroupId=ch.elca.el4j.services -DartifactId=xmlmerge -Dversion=2.0-SNAPSHOT-20100303 -Dpackaging=jar -Dfile=WebContent/WEB-INF/lib/jmodule-xml_merge-common-2.0-SNAPSHOT-20100303.jar -Durl=http://artifactory:8080/artifactory/repo -DrepositoryId=repo
However I cannot work out how to use deploy:deploy to upload a maven project’s output (generated artefacts) into the repository in the same way that hudson is doing. I have tried (in the projects parent directory, where the pom is)
mvn deploy:deploy -Durl=http://artifactory:8080/artifactory/repo -DrepositoryId=repo
But it tries to deploy it to a Sonatype server and of course (thankfully) gets blocked
What am I doing wrong?
mvn deploy:deploy does not take
urlas a parameter. Instead it makes use of the information in the<distributionManagement>section of the pom to determine where to deploy. Refer to this usage link for how to use this.