Re: Re: Release a snapshot version

2018-06-27 Thread Matthieu BROUILLARD
Moreover if you are using git and want just to do `git tag && mvn deploy`
then you can have a look at https://github.com/jgitver/jgitver-maven-plugin
to understand how jgitver maven core extension can compute your project
version automatically without never modifying your pom.xml.
If you want to avoid unnecessary commits coming from the update of the pom
version then it is worth looking at it.

When it is activated you can work like below:

$ mvn validate
   ... myproject-1.0.0-SNAPSHOT
$ git tag -m "june release" 1.0
$ mvn deploy
   ... myproject-1.0.0  <-- version computed from tag without any
pom modfication
$ git add . && git commit -m "new feature blabla"
$ mvn validate
   ... myproject-1.0.1-SNAPSHOT  <-- version automatically followed
maven conventions again without any pom modfication
$ git branch featureX
$ mvn validate
   ... myproject-1.0.1-featureX-SNAPSHOT  <-- avoids automatically
version collision in branch still without any pom modfication

This way you never have to pollute your git history with commits containing
only pom version changes ; this also avoids a lot of merge problems because
there is no more unnecessary pom modifications.

-
Matthieu Brouillard




On Thu, Jun 28, 2018 at 6:23 AM Ravindranatha Panikar, Renjith <
rr...@allstate.com> wrote:

> Thanks Thomas, that did the job.
>
> regards,
>
>
> -Original Message-
> From: Thomas Broyer [mailto:t.bro...@gmail.com]
> Sent: Thursday, June 28, 2018 1:47 AM
> To: Maven Users List 
> Subject: [External] Re: Release a snapshot version
>
> It looks like you just want to deploy your snapshot to a repository; in
> that case you'll want to simply "mvn deploy", without even using the
> maven-release-plugin (for the reasons Karl Heinz gave)
>
> Le mer. 27 juin 2018 18:30, Ravindranatha Panikar, Renjith <
> rr...@allstate.com> a écrit :
>
> > I am planning to use maven release plugin for automating the release
> > of our application.
> > There can be two types of releases.
> >
> >Normal Release:
> >  Current code should be
> tagged.
> >  Pom.xml should get
> > updated to 'next-version-SNAPSHOT'.
> >  Artifacts should be
> > public to remote repository.
> >
> >SNAPSHOT Release: it can contain one or more hot fixes
> > which we would like to release on an immediate basis.
> >  Tagging is not
> > required here.
> >   Pom.xml should
> > not be updated.
> >  Artifacts should
> > be published to remote repository with name 'ProjectName-
> > next-version-SNAPSHOT'.jar'
> >
> > I know maven-release-plugin can perform the 'Normal Release'. But is
> > there any way I can handle the 'SNAPSHOT release'?
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>


RE: Re: Release a snapshot version

2018-06-27 Thread Ravindranatha Panikar, Renjith
Thanks Thomas, that did the job. 

regards,


-Original Message-
From: Thomas Broyer [mailto:t.bro...@gmail.com] 
Sent: Thursday, June 28, 2018 1:47 AM
To: Maven Users List 
Subject: [External] Re: Release a snapshot version

It looks like you just want to deploy your snapshot to a repository; in that 
case you'll want to simply "mvn deploy", without even using the 
maven-release-plugin (for the reasons Karl Heinz gave)

Le mer. 27 juin 2018 18:30, Ravindranatha Panikar, Renjith < 
rr...@allstate.com> a écrit :

> I am planning to use maven release plugin for automating the release 
> of our application.
> There can be two types of releases.
>
>Normal Release:
>  Current code should be tagged.
>  Pom.xml should get 
> updated to 'next-version-SNAPSHOT'.
>  Artifacts should be 
> public to remote repository.
>
>SNAPSHOT Release: it can contain one or more hot fixes 
> which we would like to release on an immediate basis.
>  Tagging is not 
> required here.
>   Pom.xml should 
> not be updated.
>  Artifacts should 
> be published to remote repository with name 'ProjectName- 
> next-version-SNAPSHOT'.jar'
>
> I know maven-release-plugin can perform the 'Normal Release'. But is 
> there any way I can handle the 'SNAPSHOT release'?
>

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


Re: Release a snapshot version

2018-06-27 Thread Thomas Broyer
It looks like you just want to deploy your snapshot to a repository; in
that case you'll want to simply "mvn deploy", without even using the
maven-release-plugin (for the reasons Karl Heinz gave)

Le mer. 27 juin 2018 18:30, Ravindranatha Panikar, Renjith <
rr...@allstate.com> a écrit :

> I am planning to use maven release plugin for automating the release of
> our application.
> There can be two types of releases.
>
>Normal Release:
>  Current code should be tagged.
>  Pom.xml should get updated to
> 'next-version-SNAPSHOT'.
>  Artifacts should be public to
> remote repository.
>
>SNAPSHOT Release: it can contain one or more hot fixes
> which we would like to release on an immediate basis.
>  Tagging is not
> required here.
>   Pom.xml should not
> be updated.
>  Artifacts should be
> published to remote repository with name 'ProjectName-
> next-version-SNAPSHOT'.jar'
>
> I know maven-release-plugin can perform the 'Normal Release'. But is there
> any way I can handle the 'SNAPSHOT release'?
>


Re: Release a snapshot version

2018-06-27 Thread Karl Heinz Marbaise

Hi,

On 27/06/18 12:25, Ravindranatha Panikar, Renjith wrote:

I am planning to use maven release plugin for automating the release of our 
application.
There can be two types of releases.

Normal Release:
  Current code should be tagged.
  Pom.xml should get updated to 
'next-version-SNAPSHOT'.
  Artifacts should be public to 
remote repository.

SNAPSHOT Release: it can contain one or more hot fixes which we 
would like to release on an immediate basis.
  Tagging is not required 
here.
   Pom.xml should not be 
updated.
  Artifacts should be 
published to remote repository with name 'ProjectName- 
next-version-SNAPSHOT'.jar'

I know maven-release-plugin can perform the 'Normal Release'. But is there any 
way I can handle the 'SNAPSHOT release'?


A SNAPSHOT and a release is a contradiction in itself..cause a SNAPSHOT 
versions is not a release cause it can change etc. whereas a release is 
immutable can not change...


Maybe I misunderstand your question but based on this it makes no sense 
to me...


Kind regards
Karl Heinz Marbaise

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