Skip to end of metadata
Go to start of metadata

Deploying With Webdav

As of Maven 2.0.9 it is no longer nessesary to add the build extension to your project.

The simplest way to enable webdav deployment is to add a build extension to your project:

To use mvn deploy:deploy-file with webdav, save a simple pom.xml containing wagon-webdav as a build extension in the directory from which you execute 'mvn'. (You may need to rename the pom for the project you are deploying.)

Example:

mvn deploy:deploy-file -Dfile=example.jar -DpomFile=example.pom -DrepositoryId=myrepo -Durl=dav:http://localhost:8080/archiva/repository/myrepo

You can also point Maven at an alternate pom file with -f on the command line.

Example:

mvn deploy:deploy-file -f /path/to/webdav-deploy-pom.xml -Dfile=example.jar -DpomFile=example.pom -DrepositoryId=myrepo -Durl=dav:http://localhost:8080/archiva/repository/myrepo

Alternate method, modifying the Maven distribution

Given that maven 2 doesn't currently include the wagon-webdav plug-in in its core, here's how to add it:

add to maven-2.0.x/pom.xml

add to maven-2.0.x/maven-core/pom.xml

then...

and finally install your new maven-2.0.5-SNAPSHOT-bin...

The examples from the guide to deploying 3rd party jars will now work in the following context:

Labels
  • None
  1. Jul 05, 2006

    Seems that there is no need for jdom or xml-im-exporter.

  2. Sep 26, 2007

    I tried to use it with wagon-webdav-1.0-beta-2. i had to add plexus utils to  $M2_HOME/lib

    http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.4/plexus-utils-1.4.jar

  3. Mar 26, 2008

    I only had to add these jar files when doing a maven multimodule project deployment. In anycase, I've posted the minimal list of jars that I needed here:

        http://agileshrugged.com/blog/?p=34