我有 maven-plagin 并且需要运行目标,它应该在插件之前自动运行。有可能吗?
问问题
5766 次
2 回答
4
如果您总是想在构建期间的特定点执行目标,您可以将以下内容添加到您的pom.xml
. 真正有趣的部分是<phase>...</phase>
标签,您可以在其中指定执行目标的确切时间点。
<build>
<plugins>
<plugin>
<groupId>com.foo</groupId>
<artifactId>bar-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>foobargoal</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
有关详细信息,请参阅Maven 文档。
于 2009-07-03T10:10:10.330 回答
2
您可以编写脚本并将其串在一起,如下所示:
mvn clean assembly:assembly
例如...
于 2009-07-03T08:11:13.493 回答