You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Olivier Dehon <od...@gmail.com> on 2007/12/20 03:38:47 UTC

Configure release plugin in the POM for both prepare and branch goals

Hello,

I stumbled upon the following problem and I hope I missed something
obvious that you could point me to.

I am trying to add some configuration elements for the release plugin
inside my POM, notably the <tagBase>.
The tagBase I use for the branch goal is different from the one for the
prepare goal.

How can I specify different configurations depending on the goal for the
same plugin?

I tried creating <executions>, but this forces you to bind the goal to a
phase, which I don't want to do for obvious reasons.
If I do not specify a phase within the <execution> tag, running
"mvn release:branch" from the command line does not take the
configuration inside the <execution> into account.

Worse, it seems that if I add this configuration in the POM, then
Continuum (1.1) gives a NPE when trying to prepare the release from the
GUI.

Here's the pom snippet of what I tried, both within pluginManagement or
plugins:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-release-plugin</artifactId>
  <version>2.0-beta-7</version>
  <inherited>true</inherited>
  <executions>
    <execution>
      <id>prepare</id>
      <goals>
        <goal>prepare</goal>
      </goals>
      <configuration>
        <tagBase>${projectScmBase}/tags</tagBase>
      </configuration>
    </execution>
    <execution>
      <id>branch</id>
      <goals>
        <goal>branch</goal>
      </goals>
      <configuration>
        <tagBase>${projectScmBase}/branches</tagBase>
        <updateBranchVersions>true</updateBranchVersions>
        <updateWorkingCopyVersions>false</updateWorkingCopyVersions>
      </configuration>
    </execution>
  </executions>
</plugin>

Thanks in advance for any help.

-Olivier


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