You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by MATHUS Baptiste <ma...@mipih.fr> on 2008/03/13 16:18:15 UTC

[maven-release-plugin] Unable to update SNAPSHOT project dependency

Hi all,

I'm using maven-release-plugin 2.0-beta-7 to release some artefact. 
It worked very very fine for a project that didn't have any SNAPSHOT dependency.

We have to projects A et B that are 2.1.0-SNAPSHOT.
B depends on A.

I just released A-2.1.0-m1 with maven-release-plugin. As this is not a final version yet, the "next development version" has been left to 2.1.0-SNAPSHOT.

Then I tried to do the same with B. As expected, it asked me to update the dependency against A-2.1.0-SNAPSHOT.
I want to release a B-2.1.0-m1 that would depends on the A-2.1.0-m1 I just released, but the plugin won't let me say my "next dev version" is 2.1.0-SNAPSHOT for B too.

I think this is the problem: it seems like the scenario doesn't allow putting a "next development version" that equals the current. 
However it seems like it's totally common use case when releasing an alpha, before a beta and so on.

However, it worked fine with A project without dependency, why not for B?

It seems like there's something the plugin doesn't accept, but it doesn't say anything but asking me again about that version number...

Here's the output :
C:\projet\MIPIH\workspace\Socle Fonctionnel>mvn release:prepare -Dresume=false
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'release'.
[INFO] Ignoring available plugin update: 2.4 as it requires Maven version 2.0.8
[INFO] ----------------------------------------------------------------------------
[INFO] Building Socle Fonctionnel
[INFO]    task-segment: [release:prepare] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [release:prepare]
[INFO] Verifying that there are no local modifications...
[INFO] Executing: svn --non-interactive status
[INFO] Working directory: C:\projet\MIPIH\workspace\Socle Fonctionnel
[INFO] Checking dependencies and plugins for snapshots ...
There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: :
Resolve Project Dependency Snapshots.: 'mipih:socle-technique' set to release? (yes/no) yes: :
What is the next development version? (2.1.1-SNAPSHOT) 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT

What is the next development version? (2.1.1-SNAPSHOT) 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT

What is the next development version? (2.1.1-SNAPSHOT) 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT

What is the next development version? (2.1.1-SNAPSHOT) 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT

... And so on. I tried ten times or so to see if I reach a threshold, but this really seems to loop.

Is this a bug or some misuse of mine? Please let me know if I should file an issue.

Cheers.

RE: [maven-release-plugin] Unable to update SNAPSHOT project dependency

Posted by MATHUS Baptiste <ma...@mipih.fr>.
Well, after thinking about it. I quite agree with the fact you shouldn't continue working on a 2.1.0-SNAPSHOT when you're initializing a path to a final version (including classical released versions like alpha, beta, cr/rc, ga/final). 

The thing is: actually in our case, we'd like to just publish some kind of snapshot version, but not "SNAPSHOT" in the maven sense. Something between snapshot and alpha. We wanted to call it m1.
In fact, at the moment, we can't go through a proper release path. So people are using our SNAPSHOT version. What we would like would be introducing some sort of "sticky" snapshot so that we could better handle those often changing dependencies.

At least, I think that tools should never forbid you to do something. There's some case where you have to. 
I think that maven-release-plugin should just display something like :
"urgh, you're doing something that looks like stupid to me.It's quite uncommon to release a version, then continue working on it. Are you really sure you want to put this version? (yes/no) [no]"

There's known case like Linux apt-get. Try removing libc6, or apt-get itself. Generally it will ask something like "type 'yes, I am sure, do as I say' if you want to proceed anyway".
IMO, this should be the way to go for maven-release-plugin.

I guess I will file an improvement in the tracker about it, but I'd be interested in kwowing the maven-release-plugin's developer(s) opinion.

Cheers.

-----Message d'origine-----
De : Nicole Lacoste
Envoyé : jeudi 13 mars 2008 16:41
À : Maven Users List
Objet : Re: [maven-release-plugin] Unable to update SNAPSHOT project dependency

Hi,

What you are trying to do sounds like a very bad idea.  It is better to increase the snapshot version.  The common practice is that the version of a snapshop x.y.z-SNAPSHOT will be released to x.y.z.  Your approach seems to suggest that you will release a new different 2.1.0?
 Hopefully maven won't let you do that! If it did then the release of B depending on the 2.1.0 version of A is corrupted. I am actually surprised that you were able to leave the snapshot version of A as it was - if there is a bug to be filed it is that!

Why not use the version numbers differently, either add one more digit, ie 2.1.0.1 and consider the 'final' versions only those that have 3 digits. At some point you'll have 2.1.0.x-SNAPSHOT and you release this to 2.1.1 (a final version), making the next snapshot 2.1.1.0-SNAPSHOT or stay as you are, up the final digit, and consider only 2 digit releases to be final.

Think about it, any release version is final, that's what released means.

Nicole



On 13/03/2008, MATHUS Baptiste <ma...@mipih.fr> wrote:
> Hi all,
>
>  I'm using maven-release-plugin 2.0-beta-7 to release some artefact.
>  It worked very very fine for a project that didn't have any SNAPSHOT dependency.
>
>  We have to projects A et B that are 2.1.0-SNAPSHOT.
>  B depends on A.
>
>  I just released A-2.1.0-m1 with maven-release-plugin. As this is not a final version yet, the "next development version" has been left to 2.1.0-SNAPSHOT.
>
>  Then I tried to do the same with B. As expected, it asked me to update the dependency against A-2.1.0-SNAPSHOT.
>  I want to release a B-2.1.0-m1 that would depends on the A-2.1.0-m1 I just released, but the plugin won't let me say my "next dev version" is 2.1.0-SNAPSHOT for B too.
>
>  I think this is the problem: it seems like the scenario doesn't allow putting a "next development version" that equals the current.
>  However it seems like it's totally common use case when releasing an alpha, before a beta and so on.
>
>  However, it worked fine with A project without dependency, why not for B?
>
>  It seems like there's something the plugin doesn't accept, but it doesn't say anything but asking me again about that version number...
>
>  Here's the output :
>  C:\projet\MIPIH\workspace\Socle Fonctionnel>mvn release:prepare 
> -Dresume=false  [INFO] Scanning for projects...
>  [INFO] Searching repository for plugin with prefix: 'release'.
>  [INFO] Ignoring available plugin update: 2.4 as it requires Maven 
> version 2.0.8  [INFO] 
> ----------------------------------------------------------------------
> ------
>  [INFO] Building Socle Fonctionnel
>  [INFO]    task-segment: [release:prepare] (aggregator-style)
>  [INFO] 
> ----------------------------------------------------------------------
> ------
>  [INFO] [release:prepare]
>  [INFO] Verifying that there are no local modifications...
>  [INFO] Executing: svn --non-interactive status  [INFO] Working 
> directory: C:\projet\MIPIH\workspace\Socle Fonctionnel  [INFO] 
> Checking dependencies and plugins for snapshots ...
>  There are still some remaining snapshot dependencies.: Do you want to 
> resolve them now? (yes/no) no: : yes  Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: :
>  Resolve Project Dependency Snapshots.: 'mipih:socle-technique' set to release? (yes/no) yes: :
>  What is the next development version? (2.1.1-SNAPSHOT) 
> 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT
>
>  What is the next development version? (2.1.1-SNAPSHOT) 
> 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT
>
>  What is the next development version? (2.1.1-SNAPSHOT) 
> 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT
>
>  What is the next development version? (2.1.1-SNAPSHOT) 
> 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT
>
>  ... And so on. I tried ten times or so to see if I reach a threshold, but this really seems to loop.
>
>  Is this a bug or some misuse of mine? Please let me know if I should file an issue.
>
>  Cheers.
>

---------------------------------------------------------------------
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: [maven-release-plugin] Unable to update SNAPSHOT project dependency

Posted by Nicole Lacoste <ni...@gmail.com>.
Hi,

What you are trying to do sounds like a very bad idea.  It is better
to increase the snapshot version.  The common practice is that the
version of a snapshop x.y.z-SNAPSHOT will be released to x.y.z.  Your
approach seems to suggest that you will release a new different 2.1.0?
 Hopefully maven won't let you do that! If it did then the release of
B depending on the 2.1.0 version of A is corrupted. I am actually
surprised that you were able to leave the snapshot version of A as it
was - if there is a bug to be filed it is that!

Why not use the version numbers differently, either add one more
digit, ie 2.1.0.1 and consider the 'final' versions only those that
have 3 digits. At some point you'll have 2.1.0.x-SNAPSHOT and you
release this to 2.1.1 (a final version), making the next snapshot
2.1.1.0-SNAPSHOT or stay as you are, up the final digit, and consider
only 2 digit releases to be final.

Think about it, any release version is final, that's what released means.

Nicole



On 13/03/2008, MATHUS Baptiste <ma...@mipih.fr> wrote:
> Hi all,
>
>  I'm using maven-release-plugin 2.0-beta-7 to release some artefact.
>  It worked very very fine for a project that didn't have any SNAPSHOT dependency.
>
>  We have to projects A et B that are 2.1.0-SNAPSHOT.
>  B depends on A.
>
>  I just released A-2.1.0-m1 with maven-release-plugin. As this is not a final version yet, the "next development version" has been left to 2.1.0-SNAPSHOT.
>
>  Then I tried to do the same with B. As expected, it asked me to update the dependency against A-2.1.0-SNAPSHOT.
>  I want to release a B-2.1.0-m1 that would depends on the A-2.1.0-m1 I just released, but the plugin won't let me say my "next dev version" is 2.1.0-SNAPSHOT for B too.
>
>  I think this is the problem: it seems like the scenario doesn't allow putting a "next development version" that equals the current.
>  However it seems like it's totally common use case when releasing an alpha, before a beta and so on.
>
>  However, it worked fine with A project without dependency, why not for B?
>
>  It seems like there's something the plugin doesn't accept, but it doesn't say anything but asking me again about that version number...
>
>  Here's the output :
>  C:\projet\MIPIH\workspace\Socle Fonctionnel>mvn release:prepare -Dresume=false
>  [INFO] Scanning for projects...
>  [INFO] Searching repository for plugin with prefix: 'release'.
>  [INFO] Ignoring available plugin update: 2.4 as it requires Maven version 2.0.8
>  [INFO] ----------------------------------------------------------------------------
>  [INFO] Building Socle Fonctionnel
>  [INFO]    task-segment: [release:prepare] (aggregator-style)
>  [INFO] ----------------------------------------------------------------------------
>  [INFO] [release:prepare]
>  [INFO] Verifying that there are no local modifications...
>  [INFO] Executing: svn --non-interactive status
>  [INFO] Working directory: C:\projet\MIPIH\workspace\Socle Fonctionnel
>  [INFO] Checking dependencies and plugins for snapshots ...
>  There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
>  Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: :
>  Resolve Project Dependency Snapshots.: 'mipih:socle-technique' set to release? (yes/no) yes: :
>  What is the next development version? (2.1.1-SNAPSHOT) 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT
>
>  What is the next development version? (2.1.1-SNAPSHOT) 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT
>
>  What is the next development version? (2.1.1-SNAPSHOT) 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT
>
>  What is the next development version? (2.1.1-SNAPSHOT) 2.1.1-SNAPSHOT: : 2.1.0-SNAPSHOT
>
>  ... And so on. I tried ten times or so to see if I reach a threshold, but this really seems to loop.
>
>  Is this a bug or some misuse of mine? Please let me know if I should file an issue.
>
>  Cheers.
>

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