Anthony Richir
Anthony Richir

Reputation: 649

mvn release - svn error while tagging

While trying to execute the release:prepare goal, I get the following failure :

...
[INFO] Checking in modified POMs...
[INFO] SVN commit directory: C:\dev\eclipse\workspace\xxx-parent
[INFO] Tagging release with the label xxx-parent-0.0.1...
[INFO] SVN checkout directory: C:\dev\eclipse\workspace\xxx-parent
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.603s
[INFO] Finished at: Thu Oct 22 14:43:44 CEST 2015
[INFO] Final Memory: 10M/244M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project xxx-parent: Unable to tag SCM
[ERROR] Provider message:
[ERROR] SVN tag failed.
[ERROR] Command output:
[ERROR] svn: Commit failed (details follow):
[ERROR] svn: Commit blocked by pre-commit hook (exit code 1) with output:
[ERROR] A message is mandatory!
[ERROR] The message must comply to the following structure 'TT 12345: Some explanation'.
[ERROR] Pay attention to the white space between TT and the TT number and between the colon and the explanation.
[ERROR] The explanation after the colon should at least be 10 characters long.
[ERROR] svn: MERGE of '/svn/xxxxx/xxx-parent': 409 Conflict (https://192.19.20.56)
[ERROR] -> [Help 1]
...

The project is well updated in the trunk with the release version but not in the TAGS and it looks like it's trying to do a svn merge ?! Is that it ? If so, why ?

Here is the maven-release-plugin config:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.5.3</version>
            <dependencies>
                <dependency>
                    <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
                    <artifactId>maven-scm-provider-svnjava</artifactId>
                    <version>1.6</version>
                </dependency>
            </dependencies>
            <configuration>
                <providerImplementations>
                    <svn>javasvn</svn>
                </providerImplementations>
                <branchBase>https://192.19.20.56/svn/xxxxx/xxx-parent/BRANCHES</branchBase>
                <tagBase>https://192.19.20.56/svn/xxxxx/xxx-parent/TAGS</tagBase>
                <scmCommentPrefix>TT 00000: Tagging release of project ${project.name} ${project.version}, </scmCommentPrefix>
            </configuration>
        </plugin>

Upvotes: 2

Views: 2067

Answers (2)

Anthony Richir
Anthony Richir

Reputation: 649

The solution I've found is to change the version of maven-scm-provider-svnjava used by the release plugin. It was using version 1.6, I changed it 1.15 and with this configuration, I can prepare and perform the release.

The subversion repository is in version 1.6, not sure what's the most up-to-date version of maven-scm-provider-svnjava I can use.

Upvotes: 0

zb226
zb226

Reputation: 10500

Maven's output contains pointers:

[ERROR] svn: Commit failed (details follow):
[ERROR] svn: Commit blocked by pre-commit hook (exit code 1) with output:
[ERROR] A message is mandatory!
[ERROR] The message must comply to the following structure 'TT 12345: Some explanation'.
[ERROR] Pay attention to the white space between TT and the TT number and between the colon and the explanation.
[ERROR] The explanation after the colon should at least be 10 characters long.

Your team has a pre-commit hook installed that disallows this commit, because the commit message is missing. I can only assume that the maven-release-plugin configuration you have included is not the one that is actually active, since it contains not only a commit message, but also one in the required format:

<scmCommentPrefix>TT 00000: Tagging release of project ${project.name} ${project.version}, </scmCommentPrefix>

You might try adding a commit message manually by using a command-line parameter like so:

mvn release:prepare -DscmCommentPrefix="TT 00000: Tagging release of project..."

Upvotes: 2

Related Questions