我希望插件仅在新阶段运行。主要是,我不希望插件在构建生命周期内运行。
类似于安装: maven clean build custom:meOnly
GC
注意:我正在尝试调用此插件:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>runbatchfile</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>deploy.bat</executable>
</configuration>
</plugin>
答案 0 :(得分:0)
插件由目标组成。如果您不将目标绑定到生命周期阶段,则在构建期间将不会执行目标。不过,您可以从命令行以plugin:goal
的形式启动它。
无需创建其他阶段,目标就可以了。