You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ken O'Connell <ko...@casenetllc.com> on 2012/11/07 21:51:48 UTC

maven release plugin: release:prepare fails (svn/ maven bug)

I am hoping someone can help me get around this problem?

Trying to implement maven release plugin into our processes, I came across this issue (http://jira.codehaus.org/browse/SCM-406 which is a svn/maven bug with creating tags: 'tag already exists") in our release:prepare steps while executing it through our CI servers. We have a newer version of SVN which this bug is supposed to NOT be affected by, but I still see the problem.

Anyway, following some workaround instructions http://www.flexthinker.com/2011/01/solving-%E2%80%9Cfile-already-exists%E2%80%9D-mavensvn-problem/
(included; -DpreparationGoals using "exec:exec" with -Darguments=<path to SVN executable>, BUT  I run into another issue, blocking me.
The portion of the command line argument in questions is: -DpreparationGoals="clean install exec:exec" -Darguments="-Dexec.executable='C:\Program Files\svn-win32-1.6.1\bin\svn.exe up'"

The build fails on a compilation issue when it finds an instance of the maven-exec-plugin (like the excerpt from a pom.xml config below). -because the "exec" goal for the exec-maven-plugin already exists (shown below) in an existing pom.xml file it fails to properly resolve the command line args.
...so it now FAILS the build with:
INFO] [INFO] [exec:exec {execution: run-278Inbound}]
ERROR: Failed to load E:\<Path to build dir>\up

Snipit of pom.xml
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <id>run-278Inbound</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <executable>${mapforce.exe}</executable>
                            <arguments>
                                <argument>${basedir}\src\main\altova\auth278\X12ToAuth278.mfp</argument>
                                <argument>/JAVA</argument>
                                <argument>${basedir}/target/generated-sources/mapforce</argument>
                                <argument>/LOG</argument>
                                <argument>${basedir}\target\X12ToAuth278.log</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

The "up" (shown at the end of the path in the error message) is in reference the command intended to update the code before the execution of the prepare goal (svn up). ...not mixed together with an argument in the plugin section of my pom.xml.


Thanks,
Ken


________________________________
CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.

RE: maven release plugin: release:prepare fails (svn/ maven bug)

Posted by Ken O'Connell <ko...@casenetllc.com>.
Robert
Thanks you very much for your reply.

Unfortunately, I am still having the same issue with release:prepare goal after making this change (i.e. utilizing 2.3.2 version of the maven-release-plugin, AND using the svnjava (maven-scm-plugin) as suggested in my parent pom.

I should have mentioned, we are using maven v2.2.1 and svn v1.6.9. This is executed through our CI server running Bamboo.
Command line: mvn release:prepare -B -Dtag=libscode-1.0.0 -DreleaseVersion=1.0.0 -DdevelopmentVersion=1.0.1-SNAPSHOT -Dresume=false

Thanks,
-Ken

-----Original Message-----
From: Robert Scholte [mailto:rfscholte@apache.org]
Sent: Wednesday, November 07, 2012 5:04 PM
To: Maven Users List
Subject: Re: maven release plugin: release:prepare fails (svn/ maven bug)

Hi Ken,

the maven-release-plugin and subversion work very well together, so there should be no need to think of workarounds. I'd strongly suggest to not try to combine the exec-maven-plugin to do a release.
You refer to an issue which has been fixed a long time ago, which makes me
wonder: which version of the maven-release-plugin are you using? Please lock it on 2.3.2 and try it again.
Also add the svn-executable to the PATH system variable (unless you want to use svnjava [1]) A next step would be to let Maven log at debug-level ( add -X to your mvn
command) to see which commands are executed. That should give you much more detailed information about the cause of failures.

-Robert

[1]
http://code.google.com/a/apache-extras.org/p/maven-scm-provider-svnjava/wiki/Usage



Op Wed, 07 Nov 2012 21:51:48 +0100 schreef Ken O'Connell
<ko...@casenetllc.com>:

> I am hoping someone can help me get around this problem?
>
> Trying to implement maven release plugin into our processes, I came
> across this issue (http://jira.codehaus.org/browse/SCM-406 which is a
> svn/maven bug with creating tags: 'tag already exists") in our
> release:prepare steps while executing it through our CI servers. We
> have a newer version of SVN which this bug is supposed to NOT be
> affected by, but I still see the problem.
>
> Anyway, following some workaround instructions
> http://www.flexthinker.com/2011/01/solving-%E2%80%9Cfile-already-exist
> s%E2%80%9D-mavensvn-problem/ (included; -DpreparationGoals using
> "exec:exec" with -Darguments=<path to SVN executable>, BUT  I run into
> another issue, blocking me.
> The portion of the command line argument in questions is:
> -DpreparationGoals="clean install exec:exec"
> -Darguments="-Dexec.executable='C:\Program
> Files\svn-win32-1.6.1\bin\svn.exe up'"
>
> The build fails on a compilation issue when it finds an instance of
> the maven-exec-plugin (like the excerpt from a pom.xml config below).
> -because the "exec" goal for the exec-maven-plugin already exists
> (shown
> below) in an existing pom.xml file it fails to properly resolve the
> command line args.
> ...so it now FAILS the build with:
> INFO] [INFO] [exec:exec {execution: run-278Inbound}]
> ERROR: Failed to load E:\<Path to build dir>\up
>
> Snipit of pom.xml
>             <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
>                 <artifactId>exec-maven-plugin</artifactId>
>                 <version>1.2</version>
>                 <executions>
>                     <execution>
>                         <id>run-278Inbound</id>
>                         <goals>
>                             <goal>exec</goal>
>                         </goals>
>                         <phase>generate-sources</phase>
>                         <configuration>
>                             <executable>${mapforce.exe}</executable>
>                             <arguments>
>                                 <argument>${basedir}\src\main\altova\auth278\X12ToAuth278.mfp</argument>
>                                 <argument>/JAVA</argument>
>                                 <argument>${basedir}/target/generated-sources/mapforce</argument>
>                                 <argument>/LOG</argument>
>                                 <argument>${basedir}\target\X12ToAuth278.log</argument>
>                             </arguments>
>                         </configuration>
>                     </execution>
>                 </executions>
>             </plugin>
>
> The "up" (shown at the end of the path in the error message) is in
> reference the command intended to update the code before the execution
> of the prepare goal (svn up). ...not mixed together with an argument
> in the plugin section of my pom.xml.
>
>
> Thanks,
> Ken
>
>
> ________________________________
> CONFIDENTIALITY NOTICE: This e-mail and the information transmitted
> within including any attachments is only for the recipient(s) to which
> it is intended and may contain confidential and/or privileged material.
> Any review, retransmission, dissemination or other use of; or taking
> of any action in reliance upon this information by persons or entities
> other than the intended recipient is prohibited. If you received this
> in error, please send the e-mail back by replying to the sender and
> permanently delete the entire message and its attachments from all
> computers and network systems involved in its receipt.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven release plugin: release:prepare fails (svn/ maven bug)

Posted by Robert Scholte <rf...@apache.org>.
Hi Ken,

the maven-release-plugin and subversion work very well together, so there  
should be no need to think of workarounds. I'd strongly suggest to not try  
to combine the exec-maven-plugin to do a release.
You refer to an issue which has been fixed a long time ago, which makes me  
wonder: which version of the maven-release-plugin are you using? Please  
lock it on 2.3.2 and try it again.
Also add the svn-executable to the PATH system variable (unless you want  
to use svnjava [1])
A next step would be to let Maven log at debug-level ( add -X to your mvn  
command) to see which commands are executed. That should give you much  
more detailed information about the cause of failures.

-Robert

[1]  
http://code.google.com/a/apache-extras.org/p/maven-scm-provider-svnjava/wiki/Usage



Op Wed, 07 Nov 2012 21:51:48 +0100 schreef Ken O'Connell  
<ko...@casenetllc.com>:

> I am hoping someone can help me get around this problem?
>
> Trying to implement maven release plugin into our processes, I came  
> across this issue (http://jira.codehaus.org/browse/SCM-406 which is a  
> svn/maven bug with creating tags: 'tag already exists") in our  
> release:prepare steps while executing it through our CI servers. We have  
> a newer version of SVN which this bug is supposed to NOT be affected by,  
> but I still see the problem.
>
> Anyway, following some workaround instructions  
> http://www.flexthinker.com/2011/01/solving-%E2%80%9Cfile-already-exists%E2%80%9D-mavensvn-problem/
> (included; -DpreparationGoals using "exec:exec" with -Darguments=<path  
> to SVN executable>, BUT  I run into another issue, blocking me.
> The portion of the command line argument in questions is:  
> -DpreparationGoals="clean install exec:exec"  
> -Darguments="-Dexec.executable='C:\Program  
> Files\svn-win32-1.6.1\bin\svn.exe up'"
>
> The build fails on a compilation issue when it finds an instance of the  
> maven-exec-plugin (like the excerpt from a pom.xml config below).  
> -because the "exec" goal for the exec-maven-plugin already exists (shown  
> below) in an existing pom.xml file it fails to properly resolve the  
> command line args.
> ...so it now FAILS the build with:
> INFO] [INFO] [exec:exec {execution: run-278Inbound}]
> ERROR: Failed to load E:\<Path to build dir>\up
>
> Snipit of pom.xml
>             <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
>                 <artifactId>exec-maven-plugin</artifactId>
>                 <version>1.2</version>
>                 <executions>
>                     <execution>
>                         <id>run-278Inbound</id>
>                         <goals>
>                             <goal>exec</goal>
>                         </goals>
>                         <phase>generate-sources</phase>
>                         <configuration>
>                             <executable>${mapforce.exe}</executable>
>                             <arguments>
>                                 <argument>${basedir}\src\main\altova\auth278\X12ToAuth278.mfp</argument>
>                                 <argument>/JAVA</argument>
>                                 <argument>${basedir}/target/generated-sources/mapforce</argument>
>                                 <argument>/LOG</argument>
>                                 <argument>${basedir}\target\X12ToAuth278.log</argument>
>                             </arguments>
>                         </configuration>
>                     </execution>
>                 </executions>
>             </plugin>
>
> The "up" (shown at the end of the path in the error message) is in  
> reference the command intended to update the code before the execution  
> of the prepare goal (svn up). ...not mixed together with an argument in  
> the plugin section of my pom.xml.
>
>
> Thanks,
> Ken
>
>
> ________________________________
> CONFIDENTIALITY NOTICE: This e-mail and the information transmitted  
> within including any attachments is only for the recipient(s) to which  
> it is intended and may contain confidential and/or privileged material.  
> Any review, retransmission, dissemination or other use of; or taking of  
> any action in reliance upon this information by persons or entities  
> other than the intended recipient is prohibited. If you received this in  
> error, please send the e-mail back by replying to the sender and  
> permanently delete the entire message and its attachments from all  
> computers and network systems involved in its receipt.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org