maven插件的使用

在pom.xml里添加相似的插件:html

<build>maven

    <plugins>ide

        <plugin>ui

            <groupId>iron</groupId>插件

            <artifactId>plugin</artifactId>命令行

            <version>1.0-SNAPSHOT</version><executions>xml

            <execution>htm

                <phase>compile</phase>blog

                <goals>生命周期

                    <goal>hello</goal>

                    <goal>world</goal>

                </goals>

            </execution>

        </executions>

        </plugin>

    </plugins>

    </build>


使用插件的方法:

  1. 将maven插件与生命周期阶段绑定。如<execution><phase>compile</phase><goals> <goal>hello</goal><goal>world</goal></goals></execution>,即将该插件的目标与生命周期阶段compile绑定,运行命令行mvn compile便可

  2. 直接使用命令行mvn 插件名的简写:目标


借鉴:http://www.cnblogs.com/crazy-fox/archive/2012/02/09/2343722.html

相关文章
相关标签/搜索