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/archiva/sandbox/archiva-consumer-plugin
Below are the steps on how to create a custom repository consumer and plug it in Archiva:
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<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>