You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by law5385 <la...@yahoo.com.au> on 2006/04/13 04:24:00 UTC

release:prepare error

Hello,

I am new to Maven 2 and can't find any decent documentation to help me use
the maven-release-plugin. I am trying to write a simple pom.xml to automate
the build process of a jar file, by downloading the source code from
subversion.

I have the following settings in my POM:

  <scm>
  	<connection>scm:svn://myserver/svn/testWSClient/trunk/</connection>
  
<developerConnection>scm:svn:http://mvnbuild@myserver/svn/testWSClient/trunk/</developerConnection>
  	<url>http://myserver/svn/testWSClient/trunk/</url>
  </scm>


		<plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-release-plugin</artifactId>
		  <configuration>
		  	<tagBase>http://mvnbuild@myserver/svn/testWSClient/tags/</tagBase>
		  	<tag>1.0.0</tag>
		  </configuration>
		  <executions>
		  	<execution>
		  	  <id>CreateTag</id>
		  	  <phase>generate-sources</phase>
			  <goals>
				<goal>prepare</goal>
			  </goals>
			</execution>
		  	<execution>
		  	  <id>PerformBuild</id>
		  	  <phase>compile</phase>
			  <goals>
				<goal>perform</goal>
			  </goals>
			</execution>
		  </executions>
		</plugin>


My MVN folder structure is:

testWSClient
  |
   --- branches
   --- tags
   --- trunk
       |
        --- pom.xml
        --- src
            |
             --- main

I get the following error:

[INFO] [release:prepare]
[INFO] Verifying there are no local modifications ...
Provider message:
The svn command failed.
Command output:
svn: '.' is not a working copy

My understanding is that release:prepare should create a tag in my SVN
repository and update the revision number. release:perform should then
checkout the tag from SVN and perform the build.

What I don't understand - why is Maven looking for a working copy when it's
trying to create a tag? Can't it create the tag using the svn copy command
(which doesn't need a working copy)?

I also tried checking out all of my code to testWSClient/trunk/src/main and
then running release:prepare but that didn't solve the problem.

Cheers

--
View this message in context: http://www.nabble.com/release%3Aprepare-error-t1441846.html#a3893573
Sent from the Maven - Users forum at Nabble.com.


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


Re: release:prepare error

Posted by law5385 <la...@yahoo.com.au>.
Hello,

Just wanted to write a solution to this problem in case anyone else
experiences it. I was developing my webapp in RAD (using Subclipse) and was
trying to write an automated build/release process with Maven, but I was
using Maven in a different folder altogether. The issue is that
release:prepare first checks that your working copy is up-to-date. This
means that if you are working in an IDE and you want to perform your Maven
builds separately, then you need to check out the whole trunk folder before
you can perform the build, in a new local folder outside of RAD (since
release:prepare will look for a working copy).

Going back to my folder structure:

> testWSClient 
>   | 
>    --- branches 
>    --- tags 
>    --- trunk 
>        | 
>         --- pom.xml 
>         --- src 
>             | 
>              --- main
                    |
                     --- java
                     --- webapp

This implies that pom.xml also needs to be checked in to SVN, directly
underneath the trunk. You then run release:prepare in the pom.xml folder. If
you have changed your pom.xml, then release:prepare will also complain that
your working copy has changed and you will need to commit it.

Futhermore, if you are using an IDE such as RAD then your SVN repository
needs to conform to the Maven standard directory layout. So you need to
follow the folder structure mentioned above, and then check out the whole
"main" folder as a WAR project. You will also need to configure the project
so that JavaSource = java and WebContent = webapp. You can do this by right
clicking on the WAR (in RAD) and selecting Properties -> Java Build Path ->
Source.

You should also change the default RAD Source folder names in Window ->
Preferences -> Web Tools -> New J2EE Project

I haven't tried the Maven Eclipse plug-in yet...


--
View this message in context: http://www.nabble.com/release%3Aprepare-error-t1441846.html#a3998658
Sent from the Maven - Users forum at Nabble.com.


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


Re: release:prepare error

Posted by Lee Meador <le...@leemeador.com>.
http://wiki.ucalgary.ca/page/LearningCommons/Documentation/Project_Versioning_-_Best_Practices

This has some good info on releases.

On 4/12/06, law5385 <la...@yahoo.com.au> wrote:
>
>
> Hello,
>
> I am new to Maven 2 and can't find any decent documentation to help me use
> the maven-release-plugin. I am trying to write a simple pom.xml to
> automate
> the build process of a jar file, by downloading the source code from
> subversion.
>
> I have the following settings in my POM:
>
>   <scm>
>
>         <connection>scm:svn://myserver/svn/testWSClient/trunk/</connection>
>
> <developerConnection>scm:svn:
> http://mvnbuild@myserver/svn/testWSClient/trunk/</developerConnection>
>         <url>http://myserver/svn/testWSClient/trunk/</url>
>   </scm>
>
>
>                 <plugin>
>                   <groupId>org.apache.maven.plugins</groupId>
>                   <artifactId>maven-release-plugin</artifactId>
>                   <configuration>
>                         <tagBase>
> http://mvnbuild@myserver/svn/testWSClient/tags/</tagBase>
>                         <tag>1.0.0</tag>
>                   </configuration>
>                   <executions>
>                         <execution>
>                           <id>CreateTag</id>
>                           <phase>generate-sources</phase>
>                           <goals>
>                                 <goal>prepare</goal>
>                           </goals>
>                         </execution>
>                         <execution>
>                           <id>PerformBuild</id>
>                           <phase>compile</phase>
>                           <goals>
>                                 <goal>perform</goal>
>                           </goals>
>                         </execution>
>                   </executions>
>                 </plugin>
>
>
> My MVN folder structure is:
>
> testWSClient
>   |
>    --- branches
>    --- tags
>    --- trunk
>        |
>         --- pom.xml
>         --- src
>             |
>              --- main
>
> I get the following error:
>
> [INFO] [release:prepare]
> [INFO] Verifying there are no local modifications ...
> Provider message:
> The svn command failed.
> Command output:
> svn: '.' is not a working copy
>
> My understanding is that release:prepare should create a tag in my SVN
> repository and update the revision number. release:perform should then
> checkout the tag from SVN and perform the build.
>
> What I don't understand - why is Maven looking for a working copy when
> it's
> trying to create a tag? Can't it create the tag using the svn copy command
> (which doesn't need a working copy)?
>
> I also tried checking out all of my code to testWSClient/trunk/src/main
> and
> then running release:prepare but that didn't solve the problem.
>
> Cheers
>
> --
> View this message in context:
> http://www.nabble.com/release%3Aprepare-error-t1441846.html#a3893573
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
-- Lee Meador
Sent from gmail. My real email address is lee@leemeador.com