Deploying jars to third party maven repository via WebDAV

Posted: 2008-02-10

Normally you deploy to a third party repository with a command similar to:

mvn deploy:deploy-file -Dfile=/path/to/file -DrepositoryId=repositoryId
-Durl=wagon:protocol://path/to/repo -DgroupId=groupId -DartifactId=artifactId
-Dversion=version -Dpackaging=packageType

But - to deploy via webdav needs a snapshot wagon.

To do this - create a temporary pom in the directory you are in (create a scratch dir or similar). This should contain:

   <name>Webdav Deployment POM</name>


(thanks to the maven archiva docs for this pom).

Now - in that directory you can now run something similar to

mvn deploy:deploy-file -Dfile=/path/to/file -DrepositoryId=repositoryId
-Durl=dav:protocol://path/to/repo -DgroupId=groupId -DartifactId=artifactId
-Dversion=version -Dpackaging=packageType