Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven 2 maven中的多个antrun任务_Maven 2_Ant_Maven Plugin - Fatal编程技术网

Maven 2 maven中的多个antrun任务

Maven 2 maven中的多个antrun任务,maven-2,ant,maven-plugin,Maven 2,Ant,Maven Plugin,您将如何在maven构建周期的不同阶段执行ant任务?我在构建/插件部分使用了这一点 <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>clean</id> <phase>clean</phase&

您将如何在maven构建周期的不同阶段执行ant任务?

我在构建/插件部分使用了这一点

<plugin>

    <artifactId>maven-antrun-plugin</artifactId>
    <executions>

        <execution>
            <id>clean</id>
            <phase>clean</phase>
            <configuration>
                <tasks>
                    <echo message = ">>>>>>>>>>>>>>>>>>>>>>>>>>clean"/>
                </tasks>
            </configuration>
            <goals>
                <goal>run</goal>
            </goals>
        </execution>

        <execution>
            <id>compile</id>
            <phase>compile</phase>
            <configuration>
                <tasks>
                    <echo message = ">>>>>>>>>>>>>>>>>>>>>>>>>>>>compile"/>
                </tasks>
            </configuration>
            <goals>
                <goal>run</goal>
            </goals>
        </execution>

        <execution>
            <id>package</id>
            <phase>package</phase>
            <configuration>
                <tasks>
                    <echo message = ">>>>>>>>>>>>>>>>>>>>>>>>>>>>package"/>
                </tasks>
            </configuration>
            <goals>
                <goal>run</goal>
            </goals>
        </execution>

    </executions>

</plugin>

maven antrun插件
清洁的
清洁的
跑
编译
编译
跑
包裹
包裹
跑