在maven发布时提交一些文件:准备

ben*_*iew 5 release commit maven prepare

mvn release:prepare可以提交一些文件(没有pom.xml)吗?

在My MultiModul项目中,我使用prepareGoals配置了rlease插件,以更改sql文件中的Version.

<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>
Run Code Online (Sandbox Code Playgroud)

一切正常,但更改的SQL文件将不会被提交.

sql文件位于父文件夹的子目录中.没有pom.xml

ben*_*iew 3

我现在在准备目标中使用 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>
Run Code Online (Sandbox Code Playgroud)