是否可以在 mvn release:prepare 时提交一些文件(没有 pom.xml)?
在我的 MultiModul 项目中,我使用 PreparationGoals 配置了 rlease 插件来更改 sql 文件中的版本。
<preparationGoals>clean verify org.codehaus.mojo:build-helper-maven-plugin:1.5:parse-version com.google.code.maven-replacer-plugin:replacer:1.5.0:replace</preparationGoals>
一切正常,但更改后的 sql 文件将不会被提交。
sql 文件位于父文件夹的子目录中。没有 pom.xml
我现在在准备目标中使用 scm:checkin
干净验证 org.codehaus.mojo:build-helper-maven-plugin:1.5:parse-version com.google.code.maven-replacer-plugin:replacer:1.5.0:replace scm:checkin -Dmessage="... “-DworkingDirectory=./.../...
但这与 pom.xml 的提交不同。
这导致 mvn rlelease:rollback 不会回滚准备目标中的第一个提交!
现在看起来像这样:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagBase>
......
</tagBase>
<autoVersionSubmodules>true</autoVersionSubmodules>
<arguments>-Dtest='*IT,*Test' -DfailIfNoTests=false</arguments>
<tagNameFormat>@{project.version}</tagNameFormat>
<preparationGoals>clean verify org.codehaus.mojo:build-helper-maven-plugin:parse-version com.google.code.maven-replacer-plugin:replacer:replace scm:checkin -Dmessage="Version in Komponentenversion.sql incrementiert" -DworkingDirectory=./db/include</preparationGoals>
</configuration>
</plugin>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)