summaryrefslogtreecommitdiffstats
path: root/archiva-docs/src
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-09-06 07:27:40 +0000
committerOlivier Lamy <olamy@apache.org>2011-09-06 07:27:40 +0000
commit757b5848aa3fc9de0e4dc04ab742d15260040303 (patch)
treeefcb2e052671a91cda1d0dbdcbdec80e8d28396d /archiva-docs/src
parent05962b6b42b01375bb73903f80a3b437905d864d (diff)
downloadarchiva-757b5848aa3fc9de0e4dc04ab742d15260040303.tar.gz
archiva-757b5848aa3fc9de0e4dc04ab742d15260040303.zip
fix documentation regarding custom consumer
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1165530 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-docs/src')
-rw-r--r--archiva-docs/src/site/apt/customising/writing-consumer.apt33
1 files changed, 7 insertions, 26 deletions
diff --git a/archiva-docs/src/site/apt/customising/writing-consumer.apt b/archiva-docs/src/site/apt/customising/writing-consumer.apt
index 5f70365b3..429d6e110 100644
--- a/archiva-docs/src/site/apt/customising/writing-consumer.apt
+++ b/archiva-docs/src/site/apt/customising/writing-consumer.apt
@@ -2,8 +2,9 @@
Writing a Consumer Plugin
------
Maria Odea Ching
+ Olivier Lamy
------
- 23 Nov 2007
+ 06 Sep 2011
------
~~ Licensed to the Apache Software Foundation (ASF) under one
@@ -29,6 +30,7 @@
Writing a Consumer Plugin
For a sample custom consumer, you can checkout the archiva-consumer-plugin at the archiva sandbox in the SVN repository:
+ Prior to release 1.4, plexus components are not anymore supported, you must use Spring components.
+----+
http://svn.apache.org/repos/asf/archiva/sandbox/archiva-consumer-plugin
@@ -43,33 +45,12 @@ http://svn.apache.org/repos/asf/archiva/sandbox/archiva-consumer-plugin
+----+
Ex.
-@plexus.component role="org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer"
- role-hint="discover-new-artifact"
- instantiation-strategy="per-lookup"
+@Service("knownRepositoryContentConsumer#discover-new-artifact")
+@Scope("prototype")
where,
- role: the interface that your class implements
- role-hint: the lookup name of the component (your class/consumer)
- instantiation-strategy: how your class will be instantiated
-+----+
-
- [[3]] Make sure to add the snippet below in the <build> section of the project's pom. This is needed to
- generate the components.xml.
-
-+----+
-<plugin>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-maven-plugin</artifactId>
- <version>1.3.5</version>
- <executions>
- <execution>
- <id>generate</id>
- <goals>
- <goal>descriptor</goal>
- </goals>
- </execution>
- </executions>
-</plugin>
+ Servide: unique id for your consumer.
+ Scope: the creation strategy prototype or singleton.
+----+
[[4]] Package your project by executing 'mvn clean package'