maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ansgar Konermann <>
Subject How to define file extension and packaging in component.xml? DefaultArtifactHandler does not work?
Date Sun, 03 Apr 2011 04:48:16 GMT

I'm creating a plugin for Maven (3.0.3) which is to provide a custom 
packaging type to compile drools rules and would like to assign a custom 
file extension to the generated artifact. However I got stuck:
- the generated file extension corresponds to the type given to the 
ArtifactHandler (or even to the role hint, they are the same in my 
case), but this is way too long for a file extension
- I cannot use the specified <packaging> identifier in my test poms 
(Maven complains: "unknown packaging")

Here are some source code snippets:


example pom.xml:

Does someone have a pointer to a good explanation of what an 
ArtifactHandler is supposed to do, and how it should be used? The 
javadoc of interface ArtifactHandler is empty, unfortunately.

In particular, I'd like to know:
- does the <role-hint> in components.xml have any meaning besides 
helping with dependency injection of components which share the same 
interface? Will a role-hint ever appear in a pom.xml to specify the 
- is it possible to define the string I have to use in a pom to specify 
the <packaging> by using the <packaging> element/attribute of a 
- which roles do all the other attributes of DefaultArtifactHandler play?
- are there any "well known resources" which I should read before 
continuing plugin development (besides the source code itself, which is 
what I'd like to prevent)? I could not find much in-depth description 
regarding the inner workings of maven in the well-known book "Maven: The 
Complete Reference" and the JavaDoc seem patchy.

I'd be very glad if someone could push me into the right direction.

Thanks in advance


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message