1

I have created a custom packaging type foo and foo has a LifecycleMapping where it calls several plugins. Is it possible to provide default <configuration/> or pom.xml for these plugins and phases?

I want to add a default configuration for the doSomething pluging in the <package> phase listed below.

<component-set>
<components>
    <component>
        <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
        <role-hint>foo</role-hint>
        <implementation>
            org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
        </implementation>
        <configuration>
            <phases>
                <package>
                    packaing:definition:doSomething
                </package>
            </phases>
        </configuration>
    </component>
    <component>
        <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
        <role-hint>foo</role-hint>
        <implementation>
            org.apache.maven.artifact.handler.DefaultArtifactHandler
        </implementation>
        <configuration>
            <extension>jar</extension>
            <type>foo</type>
            <packaging>foo</packaging>
            <language>java</language>
            <addedToClasspath>true</addedToClasspath>
        </configuration>
    </component>
</components>

Thomas Beauvais
  • 1,546
  • 2
  • 16
  • 30
  • Created a maven plugin which call other plugins? How did you do that? Otherwise it's hard to guess how to do things. – khmarbaise Feb 15 '14 at 22:14
  • I created a packaging time using the `components.xml` that has a custom `LifecycleMapping` and I want to be able to configure each of those plugins. It is silly to me that you would be able to define a new `LifecycleMapping` and not a configuration. – Thomas Beauvais Feb 16 '14 at 12:42

0 Answers0