aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-docs
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2007-11-23 04:02:41 +0000
committerMaria Odea B. Ching <oching@apache.org>2007-11-23 04:02:41 +0000
commit756ac977dc08d456110212fb11e3e88d9f683253 (patch)
tree58de9f21958aa734772235292835f0b01b9d60a6 /archiva-docs
parentde98da31bde24f84f57d117740b66aa1c7a662f5 (diff)
downloadarchiva-756ac977dc08d456110212fb11e3e88d9f683253.tar.gz
archiva-756ac977dc08d456110212fb11e3e88d9f683253.zip
-added content to writing-consumer page
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@597539 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-docs')
-rw-r--r--archiva-docs/src/site/apt/customising/writing-consumer.apt85
-rw-r--r--archiva-docs/src/site/site.xml2
2 files changed, 83 insertions, 4 deletions
diff --git a/archiva-docs/src/site/apt/customising/writing-consumer.apt b/archiva-docs/src/site/apt/customising/writing-consumer.apt
index e61e95666..7e2d896cc 100644
--- a/archiva-docs/src/site/apt/customising/writing-consumer.apt
+++ b/archiva-docs/src/site/apt/customising/writing-consumer.apt
@@ -1,8 +1,87 @@
------
- Writing a Custom Repository Consumer
+ Writing a Consumer Plugin
------
+ Maria Odea Ching
+ ------
+ 23 Nov 2007
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Writing a Consumer Plugin
+
+ For a sample custom consumer, you can checkout the archiva-consumer-plugin at the archiva sandbox in the SVN repository:
+
++----+
+http://svn.apache.org/repos/asf/maven/sandbox/trunk/archiva/archiva-consumer-plugin
++----+
+
+ Below are the steps on how to create a custom repository consumer and plug it in Archiva:
+
+ [[1]] Create a project for your component.
+
+ [[2]] Declare your class or in this case, consumer as a component as shown in the example below. This
+ should be put at the class level.
+
++----+
+Ex.
+@plexus.component role="org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer"
+ role-hint="discover-new-artifact"
+ instantiation-strategy="per-lookup"
+
+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>
++----+
+
+ [[4]] Package your project by executing 'mvn clean package'
+
+ [[5]] Let's say you are using the apache-archiva-1.0-bin.tar.gz to run Archiva. Unpack
+ the binaries then go to bin/linux-x86-32/ (assuming you are running on Linux), then execute
+ './run.sh console'. Then stop or shutdown Archiva after it started. (This is necessary to unpack
+ the war file.)
-Writing a Custom Repository Consumer
+ [[6]] Copy the jar file you created in step 4 in apache-archiva-1.0/apps/archiva/webapp/lib/
- :STUB: This is a documentation stub.
+ [[7]] Add the necessary configurations in archiva.xml (in this case, add 'discover-new-artifact' as a
+ <knownContentConsumer>)
+ [[8]] Start up Archiva again.
diff --git a/archiva-docs/src/site/site.xml b/archiva-docs/src/site/site.xml
index 080f81a22..be85a587d 100644
--- a/archiva-docs/src/site/site.xml
+++ b/archiva-docs/src/site/site.xml
@@ -68,7 +68,7 @@
</menu>
<menu name="Customising Archiva">
- <item name="Writing a Consumer Plugin" href="/customising/writing-consumers.html" />
+ <item name="Writing a Consumer Plugin" href="/customising/writing-consumer.html" />
</menu>
<!-- to be removed later, once content has been shifted to permanent home -->