The Maven Wagon Plugin, as the name implies, allows you to use various functions of a maven wagon. It allows you to upload resources from your build to a remote location using wagon. It allows you to download resources from a repository using wagon. It allows to list a content of a repository using wagon. Finally, by combining the upload and download capabilities, it can merge a Maven repository to another in a generic way.
The configuration are similar to FileSet in maven-assembly-plugin, maven-scm-plugin, etc.
However, due some differences in term of provider implementation, not all goals are working as expected. In general, a good way to see a particular wagon implementation would work with this plugin is to run wagon:list goal against its URL.
The following contains a list of known limitations:
to your $MAVEN_HOME/lib directory.
The following contains a couple of usage examples. Live examples are available under SVN
<project>
[...]
<build>
[...]
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>1.0-beta-6</version>
</extension>
</extensions>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<executions>
<execution>
<id>upload-javadoc</id>
<phase>deploy</phase>
<goals>
<goal>upload</goal>
</goals>
<configuration>
<fromDir>local.dir</fromDir>
<includes>*</include>
<excludes>pom.xml</excludes>
<url>scp://your.remote.host/</url>
<toDir>remote.dir</toDir>
</configuration>
</execution>
</executions>
</plugin>
</build>
[...]
</project><project>
[...]
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav</artifactId>
<version>1.0-beta-6</version>
</extension>
</extensions>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<executions>
<execution>
<id>download-test-data</id>
<phase>pre-integration-test</phase>
<goals>
<goal>download</goal>
</goals>
<configuration>
<serverId>atlassian-public</serverId>
<url>dav:https://maven.atlassian.com/public</url>
<fromDir>com/atlassian/jira/plugins/jira-plugin-test-resources/${pom.version}</fromDir>
<toDir>${project.build.directory}/test-data</toDir>
</configuration>
</execution>
</executions>
</plugin>
</build>
[...]
</project>