How do I deploy a plugin to an Archiva repository?
Author: Deron Eriksson
Description: This tutorial describes how to deploy a custom-written plugin to a Archiva maven repository.
Tutorial created using: Windows Vista || JDK 1.6.0_04 || Eclipse Web Tools Platform 2.0.1 (Eclipse 3.3.1)


Page: < 1 2

(Continued from page 1)

The project successfully deploys to my snapshots repository. The console output is shown below:

Console output from 'mvn clean deploy' on 'maven-howdy-plugin'

[INFO] Scanning for projects...
WAGON_VERSION: 1.0-beta-2
[INFO] ------------------------------------------------------------------------
[INFO] Building Howdy Plugin
[INFO]    task-segment: [clean, deploy]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory C:\dev\workspace\maven-howdy-plugin\target
[INFO] [plugin:descriptor]
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 1 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to C:\dev\workspace\maven-howdy-plugin\target\classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [jar:jar]
[INFO] Building jar: C:\dev\workspace\maven-howdy-plugin\target\maven-howdy-plugin-1.0-SNAPSHOT.jar
[INFO] [plugin:addPluginArtifactMetadata]
[INFO] [install:install]
[INFO] Installing C:\dev\workspace\maven-howdy-plugin\target\maven-howdy-plugin-1.0-SNAPSHOT.jar to \dev\m2repo\com\maventest\maven-howdy-plugin\1.0-SNAPSHOT\maven-howdy-plugin-1.0-SNAPSHOT.jar
[INFO] [plugin:updateRegistry]
[INFO] [deploy:deploy]
altDeploymentRepository = null
[INFO] Retrieving previous build number from archiva.snapshots
Uploading: http://192.168.1.7:8081/archiva/repository/snapshots/com/maventest/maven-howdy-plugin/1.0-SNAPSHOT/maven-howdy-plugin-1.0-20080219.015105-1.jar
3037/?
[INFO] Retrieving previous metadata from archiva.snapshots
[INFO] Uploading repository metadata for: 'com.maventest'
[INFO] Retrieving previous metadata from archiva.snapshots
[INFO] Uploading repository metadata for: 'snapshot com.maventest:maven-howdy-plugin:1.0-SNAPSHOT'
[INFO] Retrieving previous metadata from archiva.snapshots
[INFO] Uploading project information for maven-howdy-plugin 1.0-20080219.015105-1
[INFO] Retrieving previous metadata from archiva.snapshots
[INFO] Uploading repository metadata for: 'artifact com.maventest:maven-howdy-plugin'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Mon Feb 18 17:51:07 PST 2008
[INFO] Final Memory: 13M/23M
[INFO] ------------------------------------------------------------------------

We can verify that the snapshot plugin artifact has been deployed to the remote snapshot repository. I logged into ArchivaS and scanned the snapshot repository.

Archiva snapshot repository

After this, I browsed to the snapshot of the plugin in the Archiva repository. It is there, as expected.

'maven-howdy-plugin' in Archiva snapshot repository
Page: < 1 2