我正在使用exec-maven-plugin与maven执行批处理文件。我在软件包阶段运行它,但我需要它运行得更早。编译阶段会很好。在编译期间在maven中执行批处理文件
批处理脚本生成一个包含svn版本的属性文件。当阶段被设置为封装时,它看起来是之后它是否生成战争文件。对我来说太迟了。
然而,在日食我得到这个错误:
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (execution: Version, phase: compile)
我的pom.xml的相关部分:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>Version</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>\my\path\version\version.bat</executable>
</configuration>
</plugin>
首先,是EXEC-Maven的插件仍然是正确的工具吗?
其次,它可以在比包早的阶段运行吗?这是记录在任何地方? exec-maven-plugin项目页面上的邮件列表存档链接已过时。
为什么你需要这样的批处理文件,因为这将使你的构建不再便携。除此之外,批处理文件正在做什么? – khmarbaise