You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Jackson <th...@gmail.com> on 2008/12/09 15:40:13 UTC

Release Plugin Question

I would like some confirmation as to if my expectations as to how the 
release plugin is supposed work are correct. 

I expect the release plugin to change the version number in the 
dependency section for snapshots when it asks me to resolve the 
dependencies and I answer yes.  Let me try to give you a concrete 
example.....

Take the following pom.xml for

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>com.xco</groupId>
  <artifactId>main-jar</artifactId>
  <version>1.0-SNAPSHOT</version>

  <packaging>jar</packaging>

  <name>mainjar</name>

  <description>This is the main jar.</description>

  <scm>
    <connection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar</connection>
    <developerConnection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar</developerConnection>
    <tag>HEAD</tag>
    <url>http://svn-server/websvn/listing.php?repname=repos</url>
  </scm>

  <dependencies>

    <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <version>1.3.03</version>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>com.abc</groupId>
      <artifactId>dependent-jar-a</artifactId>
      <version>1.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>com.abc</groupId>
      <artifactId>dependent-jar-b</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>

  </dependencies>
  
</project>


by running

mvn release:prepare

I would expect the pom.xml in the tagged location and in the trunk 
location to look like the following after it asks me to resolve the 
dependencies.

Tagged pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>com.xco</groupId>
  <artifactId>main-jar</artifactId>
  <version>1.0</version>

  <packaging>jar</packaging>

  <name>mainjar</name>

  <description>This is the main jar.</description>

  <scm>
    <connection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar</connection>
    <developerConnection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar</developerConnection>
    <tag>HEAD</tag>
    <url>http://svn-server/websvn/listing.php?repname=repos</url>
  </scm>

  <dependencies>

    <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <version>1.3.03</version>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>com.abc</groupId>
      <artifactId>dependent-jar-a</artifactId>
      <version>1.0</version>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>com.abc</groupId>
      <artifactId>dependent-jar-b</artifactId>
      <version>1.0</version>
    </dependency>

  </dependencies>
  
</project>


Trunk Pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>com.xco</groupId>
  <artifactId>main-jar</artifactId>
  <version>1.1-SNAPSHOT</version>

  <packaging>jar</packaging>

  <name>mainjar</name>

  <description>This is the main jar.</description>

  <scm>
    <connection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar</connection>
    <developerConnection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar</developerConnection>
    <tag>HEAD</tag>
    <url>http://svn-server/websvn/listing.php?repname=repos</url>
  </scm>

  <dependencies>

    <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <version>1.3.03</version>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>com.abc</groupId>
      <artifactId>dependent-jar-a</artifactId>
      <version>1.1-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>com.abc</groupId>
      <artifactId>dependent-jar-b</artifactId>
      <version>1.1-SNAPSHOT</version>
    </dependency>

  </dependencies>
  
</project>

Are my assumptions about the release plugin correct or do I have to 
change the dependencies manually?

Thanks
Thomas

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


Re: Release Plugin Question

Posted by Stephen Connolly <st...@gmail.com>.
the versions maven plugin can help somewhat... though in this case,  
perhaps not perfectly

Sent from my iPod

On 9 Dec 2008, at 14:40, Thomas Jackson <th...@gmail.com>  
wrote:

> I would like some confirmation as to if my expectations as to how  
> the release plugin is supposed work are correct.
> I expect the release plugin to change the version number in the  
> dependency section for snapshots when it asks me to resolve the  
> dependencies and I answer yes.  Let me try to give you a concrete  
> example.....
>
> Take the following pom.xml for
>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
> "
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd 
> ">
>
> <modelVersion>4.0.0</modelVersion>
>
> <groupId>com.xco</groupId>
> <artifactId>main-jar</artifactId>
> <version>1.0-SNAPSHOT</version>
>
> <packaging>jar</packaging>
>
> <name>mainjar</name>
>
> <description>This is the main jar.</description>
>
> <scm>
>   <connection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar 
> </connection>
>   <developerConnection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar 
> </developerConnection>
>   <tag>HEAD</tag>
>   <url>http://svn-server/websvn/listing.php?repname=repos</url>
> </scm>
>
> <dependencies>
>
>   <dependency>
>     <groupId>xml-apis</groupId>
>     <artifactId>xml-apis</artifactId>
>     <version>1.3.03</version>
>     <scope>compile</scope>
>   </dependency>
>      <dependency>
>     <groupId>com.abc</groupId>
>     <artifactId>dependent-jar-a</artifactId>
>     <version>1.0-SNAPSHOT</version>
>     <scope>compile</scope>
>   </dependency>
>      <dependency>
>     <groupId>com.abc</groupId>
>     <artifactId>dependent-jar-b</artifactId>
>     <version>1.0-SNAPSHOT</version>
>   </dependency>
>
> </dependencies>
> </project>
>
>
> by running
>
> mvn release:prepare
>
> I would expect the pom.xml in the tagged location and in the trunk  
> location to look like the following after it asks me to resolve the  
> dependencies.
>
> Tagged pom.xml
>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
> "
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd 
> ">
>
> <modelVersion>4.0.0</modelVersion>
>
> <groupId>com.xco</groupId>
> <artifactId>main-jar</artifactId>
> <version>1.0</version>
>
> <packaging>jar</packaging>
>
> <name>mainjar</name>
>
> <description>This is the main jar.</description>
>
> <scm>
>   <connection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar 
> </connection>
>   <developerConnection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar 
> </developerConnection>
>   <tag>HEAD</tag>
>   <url>http://svn-server/websvn/listing.php?repname=repos</url>
> </scm>
>
> <dependencies>
>
>   <dependency>
>     <groupId>xml-apis</groupId>
>     <artifactId>xml-apis</artifactId>
>     <version>1.3.03</version>
>     <scope>compile</scope>
>   </dependency>
>      <dependency>
>     <groupId>com.abc</groupId>
>     <artifactId>dependent-jar-a</artifactId>
>     <version>1.0</version>
>     <scope>compile</scope>
>   </dependency>
>      <dependency>
>     <groupId>com.abc</groupId>
>     <artifactId>dependent-jar-b</artifactId>
>     <version>1.0</version>
>   </dependency>
>
> </dependencies>
> </project>
>
>
> Trunk Pom.xml
>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
> "
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd 
> ">
>
> <modelVersion>4.0.0</modelVersion>
>
> <groupId>com.xco</groupId>
> <artifactId>main-jar</artifactId>
> <version>1.1-SNAPSHOT</version>
>
> <packaging>jar</packaging>
>
> <name>mainjar</name>
>
> <description>This is the main jar.</description>
>
> <scm>
>   <connection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar 
> </connection>
>   <developerConnection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar 
> </developerConnection>
>   <tag>HEAD</tag>
>   <url>http://svn-server/websvn/listing.php?repname=repos</url>
> </scm>
>
> <dependencies>
>
>   <dependency>
>     <groupId>xml-apis</groupId>
>     <artifactId>xml-apis</artifactId>
>     <version>1.3.03</version>
>     <scope>compile</scope>
>   </dependency>
>      <dependency>
>     <groupId>com.abc</groupId>
>     <artifactId>dependent-jar-a</artifactId>
>     <version>1.1-SNAPSHOT</version>
>     <scope>compile</scope>
>   </dependency>
>      <dependency>
>     <groupId>com.abc</groupId>
>     <artifactId>dependent-jar-b</artifactId>
>     <version>1.1-SNAPSHOT</version>
>   </dependency>
>
> </dependencies>
> </project>
>
> Are my assumptions about the release plugin correct or do I have to  
> change the dependencies manually?
>
> Thanks
> Thomas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: Release Plugin Question

Posted by David Ojeda <do...@integra.la>.
To continue with the ideas/brainstorming, I think that it should ask for the 
stable version or complain and stop but there should be a separate goal that 
saves us the trouble of finding and replacing SNAPSHOT in poms...

David

On Tuesday 09 December 2008 13:49:31 Jeff MAURY wrote:
> IMO, if you have one of the dependencies that is SNAPSHOT and which is not
> part of you whole Maven build, the release plugin should complain and stop.
>
> Jeff MAURY
>
> On Tue, Dec 9, 2008 at 7:08 PM, Wendy Smoak <ws...@gmail.com> wrote:
> > On Tue, Dec 9, 2008 at 12:14 PM, Todd Thiessen <th...@nortel.com>
> >
> > wrote:
> > > Is there still active development going on with this plugin? The
> > > potential of this plugin is very high but it doesn't seem to be quite
> > > there yet.
> >
> > Certainly it's still active, but plugin dev tends to go in cycles.
> > Someone will get interested in one, knock out some issues, attract
> > some other devs with the activity, and then we'll have a release,
> > after which that one goes quiet for a while.
> >
> > --
> > Wendy
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org

-- 
David Ojeda


Re: Release Plugin Question

Posted by John Stoneham <ly...@lyrically.net>.
> IMO, if you have one of the dependencies that is SNAPSHOT and which is not
> part of you whole Maven build, the release plugin should complain and stop.

Well, it does. It just then gives you a misleading, broken option to continue.

I'd imagine the best fix, currently, might be to disable the pieces
that don't work, and do exactly what you're saying. I can imagine some
long email threads on maven-dev trying to decide precisely how it
ought to be fixed.

- John

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


Re: Release Plugin Question

Posted by Jeff MAURY <je...@jeffmaury.com>.
IMO, if you have one of the dependencies that is SNAPSHOT and which is not
part of you whole Maven build, the release plugin should complain and stop.

Jeff MAURY

On Tue, Dec 9, 2008 at 7:08 PM, Wendy Smoak <ws...@gmail.com> wrote:

> On Tue, Dec 9, 2008 at 12:14 PM, Todd Thiessen <th...@nortel.com>
> wrote:
> > Is there still active development going on with this plugin? The
> > potential of this plugin is very high but it doesn't seem to be quite
> > there yet.
>
> Certainly it's still active, but plugin dev tends to go in cycles.
> Someone will get interested in one, knock out some issues, attract
> some other devs with the activity, and then we'll have a release,
> after which that one goes quiet for a while.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
La mélancolie c'est communiste
Tout le monde y a droit de temps en temps
La mélancolie n'est pas capitaliste
C'est même gratuit pour les perdants
La mélancolie c'est pacifiste
On ne lui rentre jamais dedans
La mélancolie oh tu sais ça existe
Elle se prend même avec des gants
La mélancolie c'est pour les syndicalistes
Il faut juste sa carte de permanent

Miossec (2006)

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.lastfm.fr/listen/user/jeffmaury/personal
Mes CDs à récupérer:
http://spreadsheets.google.com/ccc?key=pNeg4Doa_oCsh7CepKPaPTA&hl=en

Re: Release Plugin Question

Posted by Wendy Smoak <ws...@gmail.com>.
On Tue, Dec 9, 2008 at 12:14 PM, Todd Thiessen <th...@nortel.com> wrote:
> Is there still active development going on with this plugin? The
> potential of this plugin is very high but it doesn't seem to be quite
> there yet.

Certainly it's still active, but plugin dev tends to go in cycles.
Someone will get interested in one, knock out some issues, attract
some other devs with the activity, and then we'll have a release,
after which that one goes quiet for a while.

-- 
Wendy

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


RE: Release Plugin Question

Posted by Todd Thiessen <th...@nortel.com>.
Is there still active development going on with this plugin? The
potential of this plugin is very high but it doesn't seem to be quite
there yet.

---
Todd Thiessen
 

> -----Original Message-----
> From: David Ojeda [mailto:dojeda-list@integra.la] 
> Sent: Tuesday, December 09, 2008 11:35 AM
> To: users@maven.apache.org
> Subject: Re: Release Plugin Question
> 
> :( bummer...
> I think there should be a notice somewhere in this plugin 
> site. I think this plugin is one of the best maven seller. I 
> have a big multi-module project and was counting on this 
> feature when performing a release (fault's on me for not 
> trying first, I will try later today if possible, just to be sure).
> 
> On Tuesday 09 December 2008 11:10:23 John Stoneham wrote:
> > On Tue, Dec 9, 2008 at 9:40 AM, Thomas Jackson
> >
> > <th...@gmail.com> wrote:
> > > I expect the release plugin to change the version number in the 
> > > dependency section for snapshots when it asks me to resolve the 
> > > dependencies and I answer yes.  Let me try to give you a concrete 
> > > example.....
> >
> > Unfortunately - and everyone who learns the release plugin ends up 
> > having to learn this the hard way - a large part of the 
> 'resolve these 
> > dependencies' bit does not work so well. Browsing the 
> release plugin's 
> > open defects will convince you of this fact. I hope to 
> spend some time 
> > next year trying to help out with some of this myself, because it's 
> > frustrating.
> >
> > The release plugin will happily keep snapshot dependencies 
> up to date, 
> > assuming they are dependencies on artifacts you're -also releasing 
> > within the same lifecycle-. Otherwise - it is best to 
> resolve them by 
> > hand for now.
> >
> > (My usual procedure is to run release:prepare, and if it finds any 
> > SNAPSHOT dependencies left unresolved, Ctrl-C, mvn release:clean, 
> > resolve them by hand, repeat as necessary. You also need to 
> check the 
> > file for the word SNAPSHOT anyway, because there's a known problem 
> > where it does not detect SNAPSHOT plugin-level dependencies.)
> >
> > - John
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> 
> --
> David Ojeda
> 
> 

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


Re: Release Plugin Question

Posted by David Ojeda <do...@integra.la>.
:( bummer...
I think there should be a notice somewhere in this plugin site. I think this 
plugin is one of the best maven seller. I have a big multi-module project and 
was counting on this feature when performing a release (fault's on me for not 
trying first, I will try later today if possible, just to be sure).

On Tuesday 09 December 2008 11:10:23 John Stoneham wrote:
> On Tue, Dec 9, 2008 at 9:40 AM, Thomas Jackson
>
> <th...@gmail.com> wrote:
> > I expect the release plugin to change the version number in the
> > dependency section for snapshots when it asks me to resolve the
> > dependencies and I answer yes.  Let me try to give you a concrete
> > example.....
>
> Unfortunately - and everyone who learns the release plugin ends up
> having to learn this the hard way - a large part of the 'resolve these
> dependencies' bit does not work so well. Browsing the release plugin's
> open defects will convince you of this fact. I hope to spend some time
> next year trying to help out with some of this myself, because it's
> frustrating.
>
> The release plugin will happily keep snapshot dependencies up to date,
> assuming they are dependencies on artifacts you're -also releasing
> within the same lifecycle-. Otherwise - it is best to resolve them by
> hand for now.
>
> (My usual procedure is to run release:prepare, and if it finds any
> SNAPSHOT dependencies left unresolved, Ctrl-C, mvn release:clean,
> resolve them by hand, repeat as necessary. You also need to check the
> file for the word SNAPSHOT anyway, because there's a known problem
> where it does not detect SNAPSHOT plugin-level dependencies.)
>
> - John
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 
David Ojeda


Re: Release Plugin Question

Posted by John Stoneham <ly...@lyrically.net>.
On Tue, Dec 9, 2008 at 9:40 AM, Thomas Jackson
<th...@gmail.com> wrote:
> I expect the release plugin to change the version number in the dependency
> section for snapshots when it asks me to resolve the dependencies and I
> answer yes.  Let me try to give you a concrete example.....

Unfortunately - and everyone who learns the release plugin ends up
having to learn this the hard way - a large part of the 'resolve these
dependencies' bit does not work so well. Browsing the release plugin's
open defects will convince you of this fact. I hope to spend some time
next year trying to help out with some of this myself, because it's
frustrating.

The release plugin will happily keep snapshot dependencies up to date,
assuming they are dependencies on artifacts you're -also releasing
within the same lifecycle-. Otherwise - it is best to resolve them by
hand for now.

(My usual procedure is to run release:prepare, and if it finds any
SNAPSHOT dependencies left unresolved, Ctrl-C, mvn release:clean,
resolve them by hand, repeat as necessary. You also need to check the
file for the word SNAPSHOT anyway, because there's a known problem
where it does not detect SNAPSHOT plugin-level dependencies.)

- John

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