You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Eric B." <eb...@hotmail.com> on 2009/03/16 19:27:27 UTC

How to use maven-release-plugin to build/release from a branch?

Hi,

How can I use the release:perform goal in the maven-release-plugin to build
my module located in a CVS branch?

I have tried mvn release:perform -DtagBase=B_2_0_0 hoping / expect that it
would pass the tagBase command along to CVS to checkout the sources from
that tag.  Unfortunately, it doesn't:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'release'.
[INFO] ------------------------------------------------------------------------
[INFO] Building DAME Common Utilities
[INFO]    task-segment: [release:perform] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [release:perform]
[INFO] Checking out the project to perform the release ...
[INFO] Executing: cmd.exe /X /C "cvs -z3 -f -d
:pserver:eric@cvs.local.ca:/dame5 -q checkout -d checkout eric-test"
[INFO] Working directory: E:\Eric\Desktop\temp\cvs\eric-test\target
[INFO] Executing goals 'deploy'...

....

Of course, since my pom.xml is only in my B_2_0_0 branch, when cvs does the
checkout, mvn is unable to find the pom.xml and fails accordingly.


I have configured my pom.xml as follows:
...
  <scm>
    <connection>scm:cvs:pserver:eric@cvs.local.ca:/dame5:eric-test</connection>
    <tag>newBranch2</tag>
  </scm>
...
   <build>
...
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-scm-plugin</artifactId>
        <version>1.1</version>
        <configuration>
          <connectionType>connection</connectionType>
        </configuration>
      </plugin>

  <plugin>
   <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-release-plugin</artifactId>
     <version>2.0-beta-8</version>
     <configuration>
        <connectionUrl>${project.scm.connection}</connectionUrl>
     </configuration>
   </plugin>
    </plugins>
  </build>


Am I missing something?  Is this somthing that is not supported by the 
maven-release-plugin?

Thanks,

Eric




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


Re: How to use maven-release-plugin to build/release from a branch?

Posted by "Eric B." <eb...@hotmail.com>.
>
> "Ringo De Smet" <ri...@gmail.com> wrote in message 
> news:e20d07ca0903170558v19147b9av5f1848e1af0f57b7@mail.gmail.com...
> Eric,
>
> 2009/3/16 Eric B. <eb...@hotmail.com>:
> > Hi,
> >
> > How can I use the release:perform goal in the maven-release-plugin to 
> > build
> > my module located in a CVS branch?
> >
> > I have tried mvn release:perform -DtagBase=B_2_0_0 hoping / expect that 
> > it
> > would pass the tagBase command along to CVS to checkout the sources from
> > that tag. Unfortunately, it doesn't:
> >
>
> From the maven-release-plugin docs, I deduce that tagBase is only used
> when your SCM is Subversion. I have never had any problems so far with
> making a release on a CVS branch.

I came to the same conclusion as well.  I looked through the plugin code, 
and only found that tagBase is used for SVN as well; the scmVersion and 
scmVersionType aren't used by the release plugin.

> How did you create the tag? You ran
> mvn release:prepare right? If you ran it and it is successfull, you
> should be able to just run mvn release:perform without any further
> arguments. The release plugin should pickup all the required release
> information from the file release.properties created by the prepare
> step.

I think that might be where my problem / confusion lies.  In the past, I 
would always tag my code, then checkout without any cvs tracking information 
and build from that.  I think my problem is that I am still trying to do the 
same thing, hoping / expecting that the plugin would be able to 
prepare/perform from a given tag, and not necesarily from a sandbox.

Thanks,

Eric




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


Re: How to use maven-release-plugin to build/release from a branch?

Posted by Ringo De Smet <ri...@gmail.com>.
Eric,

2009/3/16 Eric B. <eb...@hotmail.com>:
> Hi,
>
> How can I use the release:perform goal in the maven-release-plugin to build
> my module located in a CVS branch?
>
> I have tried mvn release:perform -DtagBase=B_2_0_0 hoping / expect that it
> would pass the tagBase command along to CVS to checkout the sources from
> that tag.  Unfortunately, it doesn't:
>

>From the maven-release-plugin docs, I deduce that tagBase is only used
when your SCM is Subversion. I have never had any problems so far with
making a release on a CVS branch. How did you create the tag? You ran
mvn release:prepare right? If you ran it and it is successfull, you
should be able to just run mvn release:perform without any further
arguments. The release plugin should pickup all the required release
information from the file release.properties created by the prepare
step.

Ringo

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