I kept trying to run a build using maven’s release plugin but it kept failing:
command output:
svn: Commit failed (details follow):
svn: OPTIONS request failed on ‘/svn-build/source/branches/training-system/idot-training’
svn: OPTIONS of ‘/svn-build/source/branches/training-system/idot-training’: authorization failed (http://svn
)
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:132)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
… 16 more
I knew i checked out the directory right, using MYUSER and MYPASS (svn –username MYUSER –password MYPASS http://svn/blah/blah).
I had the right user/pass in the passed in parameters:
mvn -e -Dusername=MYUSER -Dpassword=MYPASS –settings /home/maven/settings-training.xml –batch-mode release:prepare -DpreparationGoals=”clean” -Dtag=training-2-7-7-0 -DtagBase=http://svn/svn-build/source/tags -DreleaseVersion=2.7.7.0 -DdevVersion=2.7.8.0
Apache’s error log kept complaining “password mismatch” and “user SOMEOTHERUSER not found”.
Ended up that the release plugin definition in the pom.xml was NOT being overridden by the parameters. username, being different than user was taking, but password must have been using the password from the file, not command line. AND because no mention of “svn” is in that section, my persistant searches weren’t find it.
Here is the section i needed to find and change:
| XML | | copy code | | ? |
| 01 | <build> |
| 02 | <plugins> |
| 03 | <plugin> |
| 04 | <groupid>org.apache.maven.plugins</groupid> |
| 05 | <artifactid>maven-release-plugin</artifactid> |
| 06 | <configuration> |
| 07 | <releaseversion>${releaseVersion}</releaseversion> |
| 08 | <devversion>${devVersion}</devversion> |
| 09 | <resume>false</resume> |
| 10 | <user>BADUSERNAME</user> |
| 11 | <password>BADPASS</password> |
| 12 | </configuration> |
| 13 | </plugin> |
| 14 | </plugins> |
| 15 | </build> |











