views:

16

answers:

1

Hi all,

We have a multi-module project on which I wanted to use the release plugin.

The setup in subversion is

 /svn/repo/project
 -- branches
 -- tags
 -- trunk
 -- -- project
 -- -- pom.xml
 -- -- module1
 -- -- -- pom.xml
 -- -- module2
 -- -- -- pom.xml
 -- -- module3
 -- -- -- pom.xml
 -- -- module4
 -- -- -- pom.xml

This project has been checked out from the trunk so on my filesystem I don't have any tags or branches folder. When I use the command: mvn release:prepare, I get the error:

[INFO] ------------------------------------------------------------------------
 [ERROR] BUILD FAILURE
 [INFO] ------------------------------------------------------------------------
 [INFO] Unable to tag SCM
 Provider message:
 The svn tag command failed.
 Command output:
 svn: Commit failed (details follow):
 svn: File '/svn/repo/project/tags/project-1.0/module1/pom.xml' already exists

I do get the following when I run the command in debug mode:

[DEBUG] WARNING: A dependency of the current project (or of one the plugins used 
 in its build) was found in the reactor,
 but had not been built at the time it was requested. It will be resolved from 
 the repository instead.

 Current Project: module2
 Requested Dependency: com.mycompany:module2:jar:1.0

 NOTE: You may need to run this build to the 'compile' lifecycle phase, 
 or farther, in order to build the dependency artifact.

Of course, the tag does not exist in svn.

Someone any ideas?

A: 

Fixed this by having to set the plugin as below. Default settings were no good apparently.

<plugin>
    <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.0-beta-4</version>
        <executions>
            <execution>
                <phase>validate</phase>
                <goals>
                    <goal>create</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <doCheck>false</doCheck>
            <doUpdate>false</doUpdate>
        </configuration>
</plugin>
Peter Verhoye