You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ansgar Konermann <an...@googlemail.com> on 2011/04/04 23:42:39 UTC

Maven not picking up ArtifactHandler for custom packaging type

Hi all,

I'm still struggling with forcing maven to create an artifact of a 
custom packaging type for a plugin I'm writing. In particular, maven 
seems to ignore the ArtifactHandler I specify in my components.xml:

<component>
<role>org.apache.maven.artifact.handler.ArtifactHandler</role>
<role-hint>drools-knowledge-module</role-hint>

<implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
<configuration>
<type>drools-knowledge-module</type>
<extension>dkm</extension>
<packaging>drools-knowledge-module</packaging>
<includesDependencies>false</includesDependencies>
<addedToClasspath>false</addedToClasspath>
</configuration>
</component>

The test project I'm using to debug the plugin has 
<extensions>true</extensions> for my plugin and the packaging type set 
to drools-knowledge-module.

In a debugger, I can see that project.getArtifact() returns a 
DefaultArtifact. Its attribute artifactHandler is set to a 
DefaultArtifactHandler instance which is substantially different from 
what I specified in my components.xml: it has type set to 
"drools-knowledge-module", but any other property is null.

My question: what do I have to do to make Maven (3.0.3) pick up my 
custom artifact handler?

Any help greatly appreciated.

Best regards

Ansgar

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org