如何使用自定义插件配置创建自定义Maven包装类型

时间:2014-02-14 12:35:43

标签: maven maven-lifecycle

我创建了一个自定义打包类型foofoo有一个LifecycleMapping,它调用了几个插件。是否可以为这些插件和阶段提供默认的<configuration/>或pom.xml?

我想在下面列出的doSomething阶段添加<package>插件的默认配置。

<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>

0 个答案:

没有答案