You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dan Tran <da...@gmail.com> on 2019/09/12 02:06:42 UTC

Same snapshot deploy number for entire build - possible

Hello Maven Users and Development Team

Currently, artifact deployed as snapshot at Maven repository has the
following format

     artifactId-version-timestamp-NN

where NN auto-incremented at each maven module and the number varies

Is there a way to use same snapshot NN for the entire multi-module maven
build?

If I have to implement a solution, would it be as an extension or I have to
tinker with maven-deploy-plugin?

Very appreciated any advice

-D

Re: Same snapshot deploy number for entire build - possible

Posted by Tibor Digana <ti...@apache.org>.
I think the timestamp after "-SNAPSHOT" is something which should not be
customized as by Maven design.
The version before "-SNAPSHOT"is something which is up to you.
Some companies customize the version to *<version in pom>-<commit number in
git>-<build number in jenkins>* executed on Jenkins CI.
If it is a problem in multimodule project with messy timestamp then it is
strange bug. You can configure installAtEnd=true
https://maven.apache.org/plugins/maven-install-plugin/install-mojo.html#installAtEnd
but it is only a workaround.

On Fri, Sep 13, 2019 at 10:42 PM Tamás Cservenák <ta...@cservenak.net>
wrote:

> Howdy,
>
> so what Dan is asking for is I think the following thing:
> On multi module snapshot deploy, the last bit of snapshot timestamped
> version is "buildNo".
>
> Consider following scenario: you have a 3 module reactor build:
> i) you deploy first time: the buildNo is -1
> ii) you deploy second time, and 2nd module UT fails: result in repo is 1st
> module has -2, while the rest, as module2 failed, is not deployed
> iii) you deploy third time: the build No is -3 for 1st module, while it is
> -2 for the rest.
>
> All sounds great ("as it should be"), but buildNo has "fall apart". 3rd
> deployment will have snapshots that will have their version like
> 1.0-yyyymmdd.hhmmss-3 while the rest version is 1.0-yyyymmdd.hhmmss-2.
>
> Determining buildNo is possible only from maven metadata.xml, that may be
> overkill. Nothing logically "groups" the two version above, even if they
> were deployed at same time, by the same build.
>
> Deploy at end may help here, yes, but personally, I dislike the fact how
> buildNo is calculated (md get, buildNo++ jar put,, modified md put).
>
> Also, this topic seems to me, like somewhat related to the overall issue of
> https://issues.apache.org/jira/browse/MNG-6581
>
> Thanks,
> T
>
>
>
> On Fri, Sep 13, 2019 at 8:32 PM Francois Marot <fr...@gmail.com>
> wrote:
>
> >  can you tell us a little bit more about your problem please ?
> > You say "Currently, artifact deployed as snapshot at Maven repository has
> > the following format: artifactId-version-timestamp-NN ". Do youmean the
> > filename in the repo ? If so, why is it a problem for you ?
> > Share more with us and I think we'll suggest solution more adapted for
> your
> > use case  ;)
> >
> > Regards,
> > Francois
> >
> >
> >
> > On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:
> >
> > > Hello Maven Users and Development Team
> > >
> > > Currently, artifact deployed as snapshot at Maven repository has the
> > > following format
> > >
> > >      artifactId-version-timestamp-NN
> > >
> > > where NN auto-incremented at each maven module and the number varies
> > >
> > > Is there a way to use same snapshot NN for the entire multi-module
> maven
> > > build?
> > >
> > > If I have to implement a solution, would it be as an extension or I
> have
> > to
> > > tinker with maven-deploy-plugin?
> > >
> > > Very appreciated any advice
> > >
> > > -D
> > >
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Tibor Digana <ti...@apache.org>.
Dan, you know how we solved this problem, we wrote Jenkinsfile with
interactive GUI. The release manager of QA filled out the items in web GUI
of Jenkins, means Version, Deployment IP in QA machines and some build
options. Simply we moved the responsibility to the person who argued the
most about the builds with different versions.

On Sat, Sep 14, 2019 at 7:17 AM Dan Tran <da...@gmail.com> wrote:

> Hi Jason,
>
> There is no problem having maven to maven snapshot dependencies between
> teams.
>
> The problem arises when you have 3 to 4 installer type artifacts landing on
> QA  teams who have to install/deploy and coordinate
>
>  Having the same snapshot number at the end of each installer artifact
> helps.  Knowing all coming from same build
>
> Still waiting for the maven dev team to chime in if there is possible
> solution :-)
>
> Thanks for all feedbacks
>
> -D
>
>
>
>
> On Fri, Sep 13, 2019 at 5:33 PM Jason Young <ja...@procentive.com>
> wrote:
>
> > Dan,
> >
> > Why are people asking about anything after `SNAPSHOT` in the version
> > number, i.e. why do they care? Are discrepancies causing build failures
> > somehow?
> >
> > My team's projects depend on each other with `SNAPSHOT` versions but
> > without specifying a build number or timestamp, e.g.
> > `<version>1.2.3-SNAPSHOT</version>`. This, combined with a policy to
> always
> > get the latest SNAPSHOT (just like the `-U` argument only applied
> > implicitly), makes every build use the latest SNAPSHOT of any
> dependencies
> > it does not build from source. Nobody ever asks me about timestamps or
> > build numbers that e.g. Nexus keeps up with.
> >
> > Regarding the policy or the -U argument, IMO these are necessary for
> > correct builds because the default policy, last I checked, is to download
> > the latest SNAPSHOT only if Maven hasn't checked in the last 24 hours,
> > which I find bewildering.
> >
> > Again, you can define the version _once for all projects_ in a parent
> > pom.xml. Let us know if that makes sense or if it is not an option for
> some
> > reason.
> >
> > HTH. Sorry if I still don't understand the problem.
> >
> > On Fri, Sep 13, 2019 at 6:22 PM Dan Tran <da...@gmail.com> wrote:
> >
> > > @ Tamás Cservenák you read my mind thanks
> > >
> > > The problem I am facing is, out of a few hundred artifacts deployed
> every
> > > build.
> > > There is a handful of artifacts that landed on QA side. By having the
> > same
> > > 'buildNo/snapshotNo'
> > >  ( ie artifactId-version-timestamp-buildNo.xx)  it is much easier to
> > > communicate,
> > > otherwise, it is a constant problem explaining why they are not the
> same
> > >
> > > This is an ongoing problem at my workplace.
> > >
> > > deployAtEnd never work for us
> > > https://issues.apache.org/jira/projects/MDEPLOY especially this one
> > > https://issues.apache.org/jira/projects/MDEPLOY/issues/MDEPLOY-226
> > >
> > > We can switch to release build but that is not an option since we would
> > run
> > > out  of storage quickly and have to purge ourselves
> > >
> > > The question here what is the best way to implement an option asking
> > > maven-deploy-plugin to use the same provided 'buildNo' ? possible?
> > >
> > > Thanks
> > >
> > > -D
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Fri, Sep 13, 2019 at 1:53 PM Francois Marot <
> francois.marot@gmail.com
> > >
> > > wrote:
> > >
> > > > OK, I get the "problem" but in fact I do not think this is a problem.
> > > > How those files (with the number suffix) are named, whether you
> deploy
> > > (to
> > > > a remote repo) or install (to a local folder), is just an
> > implementation
> > > > detail. You should never end up accessing those files by their name.
> > > > Let me explain: if you want to get all the 3 latest artifacts,
> whatever
> > > the
> > > > file name and the timestamp version, you can just create a pom having
> > > those
> > > > 3 artifacts declared as dependencies and use maven dependency plugin
> (
> > > >
> > >
> >
> https://maven.apache.org/plugins/maven-dependency-plugin/plugin-info.html
> > > > )
> > > > to copy those artifacts in a directory. Use the "-U" flag to make
> sure
> > to
> > > > get the latest version. This way, maven will care about the file
> names,
> > > but
> > > > you will not.
> > > >
> > > > I hope I can help
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Fri, 13 Sep 2019 at 22:42, Tamás Cservenák <ta...@cservenak.net>
> > > wrote:
> > > >
> > > > > Howdy,
> > > > >
> > > > > so what Dan is asking for is I think the following thing:
> > > > > On multi module snapshot deploy, the last bit of snapshot
> timestamped
> > > > > version is "buildNo".
> > > > >
> > > > > Consider following scenario: you have a 3 module reactor build:
> > > > > i) you deploy first time: the buildNo is -1
> > > > > ii) you deploy second time, and 2nd module UT fails: result in repo
> > is
> > > > 1st
> > > > > module has -2, while the rest, as module2 failed, is not deployed
> > > > > iii) you deploy third time: the build No is -3 for 1st module,
> while
> > it
> > > > is
> > > > > -2 for the rest.
> > > > >
> > > > > All sounds great ("as it should be"), but buildNo has "fall apart".
> > 3rd
> > > > > deployment will have snapshots that will have their version like
> > > > > 1.0-yyyymmdd.hhmmss-3 while the rest version is
> > 1.0-yyyymmdd.hhmmss-2.
> > > > >
> > > > > Determining buildNo is possible only from maven metadata.xml, that
> > may
> > > be
> > > > > overkill. Nothing logically "groups" the two version above, even if
> > > they
> > > > > were deployed at same time, by the same build.
> > > > >
> > > > > Deploy at end may help here, yes, but personally, I dislike the
> fact
> > > how
> > > > > buildNo is calculated (md get, buildNo++ jar put,, modified md
> put).
> > > > >
> > > > > Also, this topic seems to me, like somewhat related to the overall
> > > issue
> > > > of
> > > > > https://issues.apache.org/jira/browse/MNG-6581
> > > > >
> > > > > Thanks,
> > > > > T
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Sep 13, 2019 at 8:32 PM Francois Marot <
> > > francois.marot@gmail.com
> > > > >
> > > > > wrote:
> > > > >
> > > > > >  can you tell us a little bit more about your problem please ?
> > > > > > You say "Currently, artifact deployed as snapshot at Maven
> > repository
> > > > has
> > > > > > the following format: artifactId-version-timestamp-NN ". Do
> youmean
> > > the
> > > > > > filename in the repo ? If so, why is it a problem for you ?
> > > > > > Share more with us and I think we'll suggest solution more
> adapted
> > > for
> > > > > your
> > > > > > use case  ;)
> > > > > >
> > > > > > Regards,
> > > > > > Francois
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com>
> wrote:
> > > > > >
> > > > > > > Hello Maven Users and Development Team
> > > > > > >
> > > > > > > Currently, artifact deployed as snapshot at Maven repository
> has
> > > the
> > > > > > > following format
> > > > > > >
> > > > > > >      artifactId-version-timestamp-NN
> > > > > > >
> > > > > > > where NN auto-incremented at each maven module and the number
> > > varies
> > > > > > >
> > > > > > > Is there a way to use same snapshot NN for the entire
> > multi-module
> > > > > maven
> > > > > > > build?
> > > > > > >
> > > > > > > If I have to implement a solution, would it be as an extension
> > or I
> > > > > have
> > > > > > to
> > > > > > > tinker with maven-deploy-plugin?
> > > > > > >
> > > > > > > Very appreciated any advice
> > > > > > >
> > > > > > > -D
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> >
> > --
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Dan Tran <da...@gmail.com>.
Found  this JIRA at MDEPLOY

   * https://issues.apache.org/jira/projects/MDEPLOY/issues/MDEPLOY-217
   * https://issues.apache.org/jira/projects/MDEPLOY/issues/MDEPLOY-199

Looks the place to look for is at maven-resolver? which responsible to
download maven-metadata and calculate next build number

Thanks

-D


On Sat, Sep 14, 2019 at 2:52 AM Robert Scholte <rf...@apache.org> wrote:

> On Sat, 14 Sep 2019 07:17:16 +0200, Dan Tran <da...@gmail.com> wrote:
>
> > Still waiting for the maven dev team to chime in if there is possible
> > solution
>
> Tamás is dev team member :)
>
> I don't know which code is responsible for adding the buildnumer.
> Personally I'd like to invest in MNG-5666[1], which should already be
> huge
> help for a lot of people.
> It might even reduce your problem. And afterwards, depending on where the
> buildnumber calculation is done, it should be easier to implement it per
> "deploymentgroup".
>
> thanks,
> Robert
>
> [1] https://issues.apache.org/jira/browse/MNG-5666
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Same snapshot deploy number for entire build - possible

Posted by Robert Scholte <rf...@apache.org>.
On Sat, 14 Sep 2019 07:17:16 +0200, Dan Tran <da...@gmail.com> wrote:

> Still waiting for the maven dev team to chime in if there is possible
> solution

Tamás is dev team member :)

I don't know which code is responsible for adding the buildnumer.
Personally I'd like to invest in MNG-5666[1], which should already be huge  
help for a lot of people.
It might even reduce your problem. And afterwards, depending on where the  
buildnumber calculation is done, it should be easier to implement it per  
"deploymentgroup".

thanks,
Robert

[1] https://issues.apache.org/jira/browse/MNG-5666

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


Re: Same snapshot deploy number for entire build - possible

Posted by Dan Tran <da...@gmail.com>.
Hi Jason,

There is no problem having maven to maven snapshot dependencies between
teams.

The problem arises when you have 3 to 4 installer type artifacts landing on
QA  teams who have to install/deploy and coordinate

 Having the same snapshot number at the end of each installer artifact
helps.  Knowing all coming from same build

Still waiting for the maven dev team to chime in if there is possible
solution :-)

Thanks for all feedbacks

-D




On Fri, Sep 13, 2019 at 5:33 PM Jason Young <ja...@procentive.com>
wrote:

> Dan,
>
> Why are people asking about anything after `SNAPSHOT` in the version
> number, i.e. why do they care? Are discrepancies causing build failures
> somehow?
>
> My team's projects depend on each other with `SNAPSHOT` versions but
> without specifying a build number or timestamp, e.g.
> `<version>1.2.3-SNAPSHOT</version>`. This, combined with a policy to always
> get the latest SNAPSHOT (just like the `-U` argument only applied
> implicitly), makes every build use the latest SNAPSHOT of any dependencies
> it does not build from source. Nobody ever asks me about timestamps or
> build numbers that e.g. Nexus keeps up with.
>
> Regarding the policy or the -U argument, IMO these are necessary for
> correct builds because the default policy, last I checked, is to download
> the latest SNAPSHOT only if Maven hasn't checked in the last 24 hours,
> which I find bewildering.
>
> Again, you can define the version _once for all projects_ in a parent
> pom.xml. Let us know if that makes sense or if it is not an option for some
> reason.
>
> HTH. Sorry if I still don't understand the problem.
>
> On Fri, Sep 13, 2019 at 6:22 PM Dan Tran <da...@gmail.com> wrote:
>
> > @ Tamás Cservenák you read my mind thanks
> >
> > The problem I am facing is, out of a few hundred artifacts deployed every
> > build.
> > There is a handful of artifacts that landed on QA side. By having the
> same
> > 'buildNo/snapshotNo'
> >  ( ie artifactId-version-timestamp-buildNo.xx)  it is much easier to
> > communicate,
> > otherwise, it is a constant problem explaining why they are not the same
> >
> > This is an ongoing problem at my workplace.
> >
> > deployAtEnd never work for us
> > https://issues.apache.org/jira/projects/MDEPLOY especially this one
> > https://issues.apache.org/jira/projects/MDEPLOY/issues/MDEPLOY-226
> >
> > We can switch to release build but that is not an option since we would
> run
> > out  of storage quickly and have to purge ourselves
> >
> > The question here what is the best way to implement an option asking
> > maven-deploy-plugin to use the same provided 'buildNo' ? possible?
> >
> > Thanks
> >
> > -D
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Sep 13, 2019 at 1:53 PM Francois Marot <francois.marot@gmail.com
> >
> > wrote:
> >
> > > OK, I get the "problem" but in fact I do not think this is a problem.
> > > How those files (with the number suffix) are named, whether you deploy
> > (to
> > > a remote repo) or install (to a local folder), is just an
> implementation
> > > detail. You should never end up accessing those files by their name.
> > > Let me explain: if you want to get all the 3 latest artifacts, whatever
> > the
> > > file name and the timestamp version, you can just create a pom having
> > those
> > > 3 artifacts declared as dependencies and use maven dependency plugin (
> > >
> >
> https://maven.apache.org/plugins/maven-dependency-plugin/plugin-info.html
> > > )
> > > to copy those artifacts in a directory. Use the "-U" flag to make sure
> to
> > > get the latest version. This way, maven will care about the file names,
> > but
> > > you will not.
> > >
> > > I hope I can help
> > >
> > >
> > >
> > >
> > >
> > > On Fri, 13 Sep 2019 at 22:42, Tamás Cservenák <ta...@cservenak.net>
> > wrote:
> > >
> > > > Howdy,
> > > >
> > > > so what Dan is asking for is I think the following thing:
> > > > On multi module snapshot deploy, the last bit of snapshot timestamped
> > > > version is "buildNo".
> > > >
> > > > Consider following scenario: you have a 3 module reactor build:
> > > > i) you deploy first time: the buildNo is -1
> > > > ii) you deploy second time, and 2nd module UT fails: result in repo
> is
> > > 1st
> > > > module has -2, while the rest, as module2 failed, is not deployed
> > > > iii) you deploy third time: the build No is -3 for 1st module, while
> it
> > > is
> > > > -2 for the rest.
> > > >
> > > > All sounds great ("as it should be"), but buildNo has "fall apart".
> 3rd
> > > > deployment will have snapshots that will have their version like
> > > > 1.0-yyyymmdd.hhmmss-3 while the rest version is
> 1.0-yyyymmdd.hhmmss-2.
> > > >
> > > > Determining buildNo is possible only from maven metadata.xml, that
> may
> > be
> > > > overkill. Nothing logically "groups" the two version above, even if
> > they
> > > > were deployed at same time, by the same build.
> > > >
> > > > Deploy at end may help here, yes, but personally, I dislike the fact
> > how
> > > > buildNo is calculated (md get, buildNo++ jar put,, modified md put).
> > > >
> > > > Also, this topic seems to me, like somewhat related to the overall
> > issue
> > > of
> > > > https://issues.apache.org/jira/browse/MNG-6581
> > > >
> > > > Thanks,
> > > > T
> > > >
> > > >
> > > >
> > > > On Fri, Sep 13, 2019 at 8:32 PM Francois Marot <
> > francois.marot@gmail.com
> > > >
> > > > wrote:
> > > >
> > > > >  can you tell us a little bit more about your problem please ?
> > > > > You say "Currently, artifact deployed as snapshot at Maven
> repository
> > > has
> > > > > the following format: artifactId-version-timestamp-NN ". Do youmean
> > the
> > > > > filename in the repo ? If so, why is it a problem for you ?
> > > > > Share more with us and I think we'll suggest solution more adapted
> > for
> > > > your
> > > > > use case  ;)
> > > > >
> > > > > Regards,
> > > > > Francois
> > > > >
> > > > >
> > > > >
> > > > > On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:
> > > > >
> > > > > > Hello Maven Users and Development Team
> > > > > >
> > > > > > Currently, artifact deployed as snapshot at Maven repository has
> > the
> > > > > > following format
> > > > > >
> > > > > >      artifactId-version-timestamp-NN
> > > > > >
> > > > > > where NN auto-incremented at each maven module and the number
> > varies
> > > > > >
> > > > > > Is there a way to use same snapshot NN for the entire
> multi-module
> > > > maven
> > > > > > build?
> > > > > >
> > > > > > If I have to implement a solution, would it be as an extension
> or I
> > > > have
> > > > > to
> > > > > > tinker with maven-deploy-plugin?
> > > > > >
> > > > > > Very appreciated any advice
> > > > > >
> > > > > > -D
> > > > > >
> > > > >
> > > >
> > >
> >
>
>
> --
>

Re: Same snapshot deploy number for entire build - possible

Posted by Jason Young <ja...@procentive.com>.
Dan,

Why are people asking about anything after `SNAPSHOT` in the version
number, i.e. why do they care? Are discrepancies causing build failures
somehow?

My team's projects depend on each other with `SNAPSHOT` versions but
without specifying a build number or timestamp, e.g.
`<version>1.2.3-SNAPSHOT</version>`. This, combined with a policy to always
get the latest SNAPSHOT (just like the `-U` argument only applied
implicitly), makes every build use the latest SNAPSHOT of any dependencies
it does not build from source. Nobody ever asks me about timestamps or
build numbers that e.g. Nexus keeps up with.

Regarding the policy or the -U argument, IMO these are necessary for
correct builds because the default policy, last I checked, is to download
the latest SNAPSHOT only if Maven hasn't checked in the last 24 hours,
which I find bewildering.

Again, you can define the version _once for all projects_ in a parent
pom.xml. Let us know if that makes sense or if it is not an option for some
reason.

HTH. Sorry if I still don't understand the problem.

On Fri, Sep 13, 2019 at 6:22 PM Dan Tran <da...@gmail.com> wrote:

> @ Tamás Cservenák you read my mind thanks
>
> The problem I am facing is, out of a few hundred artifacts deployed every
> build.
> There is a handful of artifacts that landed on QA side. By having the same
> 'buildNo/snapshotNo'
>  ( ie artifactId-version-timestamp-buildNo.xx)  it is much easier to
> communicate,
> otherwise, it is a constant problem explaining why they are not the same
>
> This is an ongoing problem at my workplace.
>
> deployAtEnd never work for us
> https://issues.apache.org/jira/projects/MDEPLOY especially this one
> https://issues.apache.org/jira/projects/MDEPLOY/issues/MDEPLOY-226
>
> We can switch to release build but that is not an option since we would run
> out  of storage quickly and have to purge ourselves
>
> The question here what is the best way to implement an option asking
> maven-deploy-plugin to use the same provided 'buildNo' ? possible?
>
> Thanks
>
> -D
>
>
>
>
>
>
>
>
>
> On Fri, Sep 13, 2019 at 1:53 PM Francois Marot <fr...@gmail.com>
> wrote:
>
> > OK, I get the "problem" but in fact I do not think this is a problem.
> > How those files (with the number suffix) are named, whether you deploy
> (to
> > a remote repo) or install (to a local folder), is just an implementation
> > detail. You should never end up accessing those files by their name.
> > Let me explain: if you want to get all the 3 latest artifacts, whatever
> the
> > file name and the timestamp version, you can just create a pom having
> those
> > 3 artifacts declared as dependencies and use maven dependency plugin (
> >
> https://maven.apache.org/plugins/maven-dependency-plugin/plugin-info.html
> > )
> > to copy those artifacts in a directory. Use the "-U" flag to make sure to
> > get the latest version. This way, maven will care about the file names,
> but
> > you will not.
> >
> > I hope I can help
> >
> >
> >
> >
> >
> > On Fri, 13 Sep 2019 at 22:42, Tamás Cservenák <ta...@cservenak.net>
> wrote:
> >
> > > Howdy,
> > >
> > > so what Dan is asking for is I think the following thing:
> > > On multi module snapshot deploy, the last bit of snapshot timestamped
> > > version is "buildNo".
> > >
> > > Consider following scenario: you have a 3 module reactor build:
> > > i) you deploy first time: the buildNo is -1
> > > ii) you deploy second time, and 2nd module UT fails: result in repo is
> > 1st
> > > module has -2, while the rest, as module2 failed, is not deployed
> > > iii) you deploy third time: the build No is -3 for 1st module, while it
> > is
> > > -2 for the rest.
> > >
> > > All sounds great ("as it should be"), but buildNo has "fall apart". 3rd
> > > deployment will have snapshots that will have their version like
> > > 1.0-yyyymmdd.hhmmss-3 while the rest version is 1.0-yyyymmdd.hhmmss-2.
> > >
> > > Determining buildNo is possible only from maven metadata.xml, that may
> be
> > > overkill. Nothing logically "groups" the two version above, even if
> they
> > > were deployed at same time, by the same build.
> > >
> > > Deploy at end may help here, yes, but personally, I dislike the fact
> how
> > > buildNo is calculated (md get, buildNo++ jar put,, modified md put).
> > >
> > > Also, this topic seems to me, like somewhat related to the overall
> issue
> > of
> > > https://issues.apache.org/jira/browse/MNG-6581
> > >
> > > Thanks,
> > > T
> > >
> > >
> > >
> > > On Fri, Sep 13, 2019 at 8:32 PM Francois Marot <
> francois.marot@gmail.com
> > >
> > > wrote:
> > >
> > > >  can you tell us a little bit more about your problem please ?
> > > > You say "Currently, artifact deployed as snapshot at Maven repository
> > has
> > > > the following format: artifactId-version-timestamp-NN ". Do youmean
> the
> > > > filename in the repo ? If so, why is it a problem for you ?
> > > > Share more with us and I think we'll suggest solution more adapted
> for
> > > your
> > > > use case  ;)
> > > >
> > > > Regards,
> > > > Francois
> > > >
> > > >
> > > >
> > > > On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:
> > > >
> > > > > Hello Maven Users and Development Team
> > > > >
> > > > > Currently, artifact deployed as snapshot at Maven repository has
> the
> > > > > following format
> > > > >
> > > > >      artifactId-version-timestamp-NN
> > > > >
> > > > > where NN auto-incremented at each maven module and the number
> varies
> > > > >
> > > > > Is there a way to use same snapshot NN for the entire multi-module
> > > maven
> > > > > build?
> > > > >
> > > > > If I have to implement a solution, would it be as an extension or I
> > > have
> > > > to
> > > > > tinker with maven-deploy-plugin?
> > > > >
> > > > > Very appreciated any advice
> > > > >
> > > > > -D
> > > > >
> > > >
> > >
> >
>


--

Re: Same snapshot deploy number for entire build - possible

Posted by Dan Tran <da...@gmail.com>.
@ Tamás Cservenák you read my mind thanks

The problem I am facing is, out of a few hundred artifacts deployed every
build.
There is a handful of artifacts that landed on QA side. By having the same
'buildNo/snapshotNo'
 ( ie artifactId-version-timestamp-buildNo.xx)  it is much easier to
communicate,
otherwise, it is a constant problem explaining why they are not the same

This is an ongoing problem at my workplace.

deployAtEnd never work for us
https://issues.apache.org/jira/projects/MDEPLOY especially this one
https://issues.apache.org/jira/projects/MDEPLOY/issues/MDEPLOY-226

We can switch to release build but that is not an option since we would run
out  of storage quickly and have to purge ourselves

The question here what is the best way to implement an option asking
maven-deploy-plugin to use the same provided 'buildNo' ? possible?

Thanks

-D









On Fri, Sep 13, 2019 at 1:53 PM Francois Marot <fr...@gmail.com>
wrote:

> OK, I get the "problem" but in fact I do not think this is a problem.
> How those files (with the number suffix) are named, whether you deploy (to
> a remote repo) or install (to a local folder), is just an implementation
> detail. You should never end up accessing those files by their name.
> Let me explain: if you want to get all the 3 latest artifacts, whatever the
> file name and the timestamp version, you can just create a pom having those
> 3 artifacts declared as dependencies and use maven dependency plugin (
> https://maven.apache.org/plugins/maven-dependency-plugin/plugin-info.html
> )
> to copy those artifacts in a directory. Use the "-U" flag to make sure to
> get the latest version. This way, maven will care about the file names, but
> you will not.
>
> I hope I can help
>
>
>
>
>
> On Fri, 13 Sep 2019 at 22:42, Tamás Cservenák <ta...@cservenak.net> wrote:
>
> > Howdy,
> >
> > so what Dan is asking for is I think the following thing:
> > On multi module snapshot deploy, the last bit of snapshot timestamped
> > version is "buildNo".
> >
> > Consider following scenario: you have a 3 module reactor build:
> > i) you deploy first time: the buildNo is -1
> > ii) you deploy second time, and 2nd module UT fails: result in repo is
> 1st
> > module has -2, while the rest, as module2 failed, is not deployed
> > iii) you deploy third time: the build No is -3 for 1st module, while it
> is
> > -2 for the rest.
> >
> > All sounds great ("as it should be"), but buildNo has "fall apart". 3rd
> > deployment will have snapshots that will have their version like
> > 1.0-yyyymmdd.hhmmss-3 while the rest version is 1.0-yyyymmdd.hhmmss-2.
> >
> > Determining buildNo is possible only from maven metadata.xml, that may be
> > overkill. Nothing logically "groups" the two version above, even if they
> > were deployed at same time, by the same build.
> >
> > Deploy at end may help here, yes, but personally, I dislike the fact how
> > buildNo is calculated (md get, buildNo++ jar put,, modified md put).
> >
> > Also, this topic seems to me, like somewhat related to the overall issue
> of
> > https://issues.apache.org/jira/browse/MNG-6581
> >
> > Thanks,
> > T
> >
> >
> >
> > On Fri, Sep 13, 2019 at 8:32 PM Francois Marot <francois.marot@gmail.com
> >
> > wrote:
> >
> > >  can you tell us a little bit more about your problem please ?
> > > You say "Currently, artifact deployed as snapshot at Maven repository
> has
> > > the following format: artifactId-version-timestamp-NN ". Do youmean the
> > > filename in the repo ? If so, why is it a problem for you ?
> > > Share more with us and I think we'll suggest solution more adapted for
> > your
> > > use case  ;)
> > >
> > > Regards,
> > > Francois
> > >
> > >
> > >
> > > On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:
> > >
> > > > Hello Maven Users and Development Team
> > > >
> > > > Currently, artifact deployed as snapshot at Maven repository has the
> > > > following format
> > > >
> > > >      artifactId-version-timestamp-NN
> > > >
> > > > where NN auto-incremented at each maven module and the number varies
> > > >
> > > > Is there a way to use same snapshot NN for the entire multi-module
> > maven
> > > > build?
> > > >
> > > > If I have to implement a solution, would it be as an extension or I
> > have
> > > to
> > > > tinker with maven-deploy-plugin?
> > > >
> > > > Very appreciated any advice
> > > >
> > > > -D
> > > >
> > >
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Francois Marot <fr...@gmail.com>.
OK, I get the "problem" but in fact I do not think this is a problem.
How those files (with the number suffix) are named, whether you deploy (to
a remote repo) or install (to a local folder), is just an implementation
detail. You should never end up accessing those files by their name.
Let me explain: if you want to get all the 3 latest artifacts, whatever the
file name and the timestamp version, you can just create a pom having those
3 artifacts declared as dependencies and use maven dependency plugin (
https://maven.apache.org/plugins/maven-dependency-plugin/plugin-info.html )
to copy those artifacts in a directory. Use the "-U" flag to make sure to
get the latest version. This way, maven will care about the file names, but
you will not.

I hope I can help





On Fri, 13 Sep 2019 at 22:42, Tamás Cservenák <ta...@cservenak.net> wrote:

> Howdy,
>
> so what Dan is asking for is I think the following thing:
> On multi module snapshot deploy, the last bit of snapshot timestamped
> version is "buildNo".
>
> Consider following scenario: you have a 3 module reactor build:
> i) you deploy first time: the buildNo is -1
> ii) you deploy second time, and 2nd module UT fails: result in repo is 1st
> module has -2, while the rest, as module2 failed, is not deployed
> iii) you deploy third time: the build No is -3 for 1st module, while it is
> -2 for the rest.
>
> All sounds great ("as it should be"), but buildNo has "fall apart". 3rd
> deployment will have snapshots that will have their version like
> 1.0-yyyymmdd.hhmmss-3 while the rest version is 1.0-yyyymmdd.hhmmss-2.
>
> Determining buildNo is possible only from maven metadata.xml, that may be
> overkill. Nothing logically "groups" the two version above, even if they
> were deployed at same time, by the same build.
>
> Deploy at end may help here, yes, but personally, I dislike the fact how
> buildNo is calculated (md get, buildNo++ jar put,, modified md put).
>
> Also, this topic seems to me, like somewhat related to the overall issue of
> https://issues.apache.org/jira/browse/MNG-6581
>
> Thanks,
> T
>
>
>
> On Fri, Sep 13, 2019 at 8:32 PM Francois Marot <fr...@gmail.com>
> wrote:
>
> >  can you tell us a little bit more about your problem please ?
> > You say "Currently, artifact deployed as snapshot at Maven repository has
> > the following format: artifactId-version-timestamp-NN ". Do youmean the
> > filename in the repo ? If so, why is it a problem for you ?
> > Share more with us and I think we'll suggest solution more adapted for
> your
> > use case  ;)
> >
> > Regards,
> > Francois
> >
> >
> >
> > On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:
> >
> > > Hello Maven Users and Development Team
> > >
> > > Currently, artifact deployed as snapshot at Maven repository has the
> > > following format
> > >
> > >      artifactId-version-timestamp-NN
> > >
> > > where NN auto-incremented at each maven module and the number varies
> > >
> > > Is there a way to use same snapshot NN for the entire multi-module
> maven
> > > build?
> > >
> > > If I have to implement a solution, would it be as an extension or I
> have
> > to
> > > tinker with maven-deploy-plugin?
> > >
> > > Very appreciated any advice
> > >
> > > -D
> > >
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Tamás Cservenák <ta...@cservenak.net>.
Howdy,

so what Dan is asking for is I think the following thing:
On multi module snapshot deploy, the last bit of snapshot timestamped
version is "buildNo".

Consider following scenario: you have a 3 module reactor build:
i) you deploy first time: the buildNo is -1
ii) you deploy second time, and 2nd module UT fails: result in repo is 1st
module has -2, while the rest, as module2 failed, is not deployed
iii) you deploy third time: the build No is -3 for 1st module, while it is
-2 for the rest.

All sounds great ("as it should be"), but buildNo has "fall apart". 3rd
deployment will have snapshots that will have their version like
1.0-yyyymmdd.hhmmss-3 while the rest version is 1.0-yyyymmdd.hhmmss-2.

Determining buildNo is possible only from maven metadata.xml, that may be
overkill. Nothing logically "groups" the two version above, even if they
were deployed at same time, by the same build.

Deploy at end may help here, yes, but personally, I dislike the fact how
buildNo is calculated (md get, buildNo++ jar put,, modified md put).

Also, this topic seems to me, like somewhat related to the overall issue of
https://issues.apache.org/jira/browse/MNG-6581

Thanks,
T



On Fri, Sep 13, 2019 at 8:32 PM Francois Marot <fr...@gmail.com>
wrote:

>  can you tell us a little bit more about your problem please ?
> You say "Currently, artifact deployed as snapshot at Maven repository has
> the following format: artifactId-version-timestamp-NN ". Do youmean the
> filename in the repo ? If so, why is it a problem for you ?
> Share more with us and I think we'll suggest solution more adapted for your
> use case  ;)
>
> Regards,
> Francois
>
>
>
> On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:
>
> > Hello Maven Users and Development Team
> >
> > Currently, artifact deployed as snapshot at Maven repository has the
> > following format
> >
> >      artifactId-version-timestamp-NN
> >
> > where NN auto-incremented at each maven module and the number varies
> >
> > Is there a way to use same snapshot NN for the entire multi-module maven
> > build?
> >
> > If I have to implement a solution, would it be as an extension or I have
> to
> > tinker with maven-deploy-plugin?
> >
> > Very appreciated any advice
> >
> > -D
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Francois Marot <fr...@gmail.com>.
 can you tell us a little bit more about your problem please ?
You say "Currently, artifact deployed as snapshot at Maven repository has
the following format: artifactId-version-timestamp-NN ". Do youmean the
filename in the repo ? If so, why is it a problem for you ?
Share more with us and I think we'll suggest solution more adapted for your
use case  ;)

Regards,
Francois



On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:

> Hello Maven Users and Development Team
>
> Currently, artifact deployed as snapshot at Maven repository has the
> following format
>
>      artifactId-version-timestamp-NN
>
> where NN auto-incremented at each maven module and the number varies
>
> Is there a way to use same snapshot NN for the entire multi-module maven
> build?
>
> If I have to implement a solution, would it be as an extension or I have to
> tinker with maven-deploy-plugin?
>
> Very appreciated any advice
>
> -D
>

Re: Same snapshot deploy number for entire build - possible

Posted by Jason Young <ja...@procentive.com>.
You never established that you're talking about the projects' versions, as
in the part between the <version> tags. Is that what you're talking about?
If so, did you say the artifactId is part of the version? Can you take
artifactId out of the version and make all projects in your reactor have
the same version, not just the same incremented part?

You can ensure that the whole version is the same throughout the reactor
most easily by:
1. making a parent pom for all projects to inherit from to define things
common to all projects, including the version.
2. inheriting from that pom from all modules.
3. Don't define <version> in any modules inheriting from that parent.
4. Adjust your version-incrementing script or Maven plugin accordingly.

NOTE that IME not all plugins, including official ones, understand the
difference between a parent pom and a multi-module pom, so to ensure
compatibility, please _make the multi-module pom also the parent of its
modules_.

HTH.

On Fri, Sep 13, 2019 at 5:50 AM Thomas Broyer <t....@gmail.com> wrote:

> Maybe you'd want to deployAtEnd?
>
> https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#deployAtEnd
>
> On Fri, Sep 13, 2019 at 12:03 PM Dan Tran <da...@gmail.com> wrote:
>
> > Looks like I need to clear thing a little bit
> >
> > Assume I have a reactor of few hundreds of maven modules and my CI
> > build deploys snapshots, first few good builds, each module deployed to
> > maven repository have same snapshot number
> >
> > Once we encounter a build failure at a module,  the snapshot number
> begins
> > to vary and over time, all modules no longer have the same snapshot
> number
> > anymore
> >
> > To be able to determine a consistent snapshot number at each build,  I
> > would like to have an ability the tell deploy maven plugin to use an
> > assigned number for all modules.
> >
> > Possible?
> >
> > Thanks
> >
> > -D
> >
> >
> >
> >
> >
> >
> > On Thu, Sep 12, 2019 at 11:31 PM Enrico Olivelli <eo...@gmail.com>
> > wrote:
> >
> > > Dan,
> > > Are you running a single 'mvn deploy' or do you have multiple runs?
> > > I have never seen weird behaviours in multi module projects
> > >
> > > Cheers
> > > Enrico
> > >
> > > Il ven 13 set 2019, 08:19 Dan Tran <da...@gmail.com> ha scritto:
> > >
> > > > Hello, Maven dev
> > > >
> > > > any suggestion/thoughts on this issue are very much appreciated
> > > >
> > > > Regards
> > > >
> > > > -D
> > > >
> > > > On Wed, Sep 11, 2019 at 7:06 PM Dan Tran <da...@gmail.com> wrote:
> > > >
> > > > > Hello Maven Users and Development Team
> > > > >
> > > > > Currently, artifact deployed as snapshot at Maven repository has
> the
> > > > > following format
> > > > >
> > > > >      artifactId-version-timestamp-NN
> > > > >
> > > > > where NN auto-incremented at each maven module and the number
> varies
> > > > >
> > > > > Is there a way to use same snapshot NN for the entire multi-module
> > > maven
> > > > > build?
> > > > >
> > > > > If I have to implement a solution, would it be as an extension or I
> > > have
> > > > > to tinker with maven-deploy-plugin?
> > > > >
> > > > > Very appreciated any advice
> > > > >
> > > > > -D
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
>
> --
> Thomas Broyer
> /tɔ.ma.bʁwa.je/ <http://xn--nna.ma.xn--bwa-xxb.je/> <
> http://xn--nna.ma.xn--bwa-xxb.je/>
>


--

Re: Same snapshot deploy number for entire build - possible

Posted by Thomas Broyer <t....@gmail.com>.
Maybe you'd want to deployAtEnd?
https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#deployAtEnd

On Fri, Sep 13, 2019 at 12:03 PM Dan Tran <da...@gmail.com> wrote:

> Looks like I need to clear thing a little bit
>
> Assume I have a reactor of few hundreds of maven modules and my CI
> build deploys snapshots, first few good builds, each module deployed to
> maven repository have same snapshot number
>
> Once we encounter a build failure at a module,  the snapshot number begins
> to vary and over time, all modules no longer have the same snapshot number
> anymore
>
> To be able to determine a consistent snapshot number at each build,  I
> would like to have an ability the tell deploy maven plugin to use an
> assigned number for all modules.
>
> Possible?
>
> Thanks
>
> -D
>
>
>
>
>
>
> On Thu, Sep 12, 2019 at 11:31 PM Enrico Olivelli <eo...@gmail.com>
> wrote:
>
> > Dan,
> > Are you running a single 'mvn deploy' or do you have multiple runs?
> > I have never seen weird behaviours in multi module projects
> >
> > Cheers
> > Enrico
> >
> > Il ven 13 set 2019, 08:19 Dan Tran <da...@gmail.com> ha scritto:
> >
> > > Hello, Maven dev
> > >
> > > any suggestion/thoughts on this issue are very much appreciated
> > >
> > > Regards
> > >
> > > -D
> > >
> > > On Wed, Sep 11, 2019 at 7:06 PM Dan Tran <da...@gmail.com> wrote:
> > >
> > > > Hello Maven Users and Development Team
> > > >
> > > > Currently, artifact deployed as snapshot at Maven repository has the
> > > > following format
> > > >
> > > >      artifactId-version-timestamp-NN
> > > >
> > > > where NN auto-incremented at each maven module and the number varies
> > > >
> > > > Is there a way to use same snapshot NN for the entire multi-module
> > maven
> > > > build?
> > > >
> > > > If I have to implement a solution, would it be as an extension or I
> > have
> > > > to tinker with maven-deploy-plugin?
> > > >
> > > > Very appreciated any advice
> > > >
> > > > -D
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
>


-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/ <http://xn--nna.ma.xn--bwa-xxb.je/>

Re: Same snapshot deploy number for entire build - possible

Posted by Thomas Broyer <t....@gmail.com>.
Maybe you'd want to deployAtEnd?
https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#deployAtEnd

On Fri, Sep 13, 2019 at 12:03 PM Dan Tran <da...@gmail.com> wrote:

> Looks like I need to clear thing a little bit
>
> Assume I have a reactor of few hundreds of maven modules and my CI
> build deploys snapshots, first few good builds, each module deployed to
> maven repository have same snapshot number
>
> Once we encounter a build failure at a module,  the snapshot number begins
> to vary and over time, all modules no longer have the same snapshot number
> anymore
>
> To be able to determine a consistent snapshot number at each build,  I
> would like to have an ability the tell deploy maven plugin to use an
> assigned number for all modules.
>
> Possible?
>
> Thanks
>
> -D
>
>
>
>
>
>
> On Thu, Sep 12, 2019 at 11:31 PM Enrico Olivelli <eo...@gmail.com>
> wrote:
>
> > Dan,
> > Are you running a single 'mvn deploy' or do you have multiple runs?
> > I have never seen weird behaviours in multi module projects
> >
> > Cheers
> > Enrico
> >
> > Il ven 13 set 2019, 08:19 Dan Tran <da...@gmail.com> ha scritto:
> >
> > > Hello, Maven dev
> > >
> > > any suggestion/thoughts on this issue are very much appreciated
> > >
> > > Regards
> > >
> > > -D
> > >
> > > On Wed, Sep 11, 2019 at 7:06 PM Dan Tran <da...@gmail.com> wrote:
> > >
> > > > Hello Maven Users and Development Team
> > > >
> > > > Currently, artifact deployed as snapshot at Maven repository has the
> > > > following format
> > > >
> > > >      artifactId-version-timestamp-NN
> > > >
> > > > where NN auto-incremented at each maven module and the number varies
> > > >
> > > > Is there a way to use same snapshot NN for the entire multi-module
> > maven
> > > > build?
> > > >
> > > > If I have to implement a solution, would it be as an extension or I
> > have
> > > > to tinker with maven-deploy-plugin?
> > > >
> > > > Very appreciated any advice
> > > >
> > > > -D
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
>


-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/ <http://xn--nna.ma.xn--bwa-xxb.je/>

Re: Same snapshot deploy number for entire build - possible

Posted by Dejan Stojadinovic <de...@gmail.com>.
@Dan Tran use 'deployAtEnd':

          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-deploy-plugin</artifactId>
		<version>someVersion</version>
              <configuration>
                    <deployAtEnd>true</deployAtEnd>
              </configuration>
          </plugin>
		 
https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html

Regards, 
Dejan S.

On 2019/09/13 10:02:33, Dan Tran <da...@gmail.com> wrote: 
> Looks like I need to clear thing a little bit
> 
> Assume I have a reactor of few hundreds of maven modules and my CI
> build deploys snapshots, first few good builds, each module deployed to
> maven repository have same snapshot number
> 
> Once we encounter a build failure at a module,  the snapshot number begins
> to vary and over time, all modules no longer have the same snapshot number
> anymore
> 
> To be able to determine a consistent snapshot number at each build,  I
> would like to have an ability the tell deploy maven plugin to use an
> assigned number for all modules.
> 
> Possible?
> 
> Thanks
> 
> -D
> 
> 
> 
> 
> 
> 
> On Thu, Sep 12, 2019 at 11:31 PM Enrico Olivelli <eo...@gmail.com>
> wrote:
> 
> > Dan,
> > Are you running a single 'mvn deploy' or do you have multiple runs?
> > I have never seen weird behaviours in multi module projects
> >
> > Cheers
> > Enrico
> >
> > Il ven 13 set 2019, 08:19 Dan Tran <da...@gmail.com> ha scritto:
> >
> > > Hello, Maven dev
> > >
> > > any suggestion/thoughts on this issue are very much appreciated
> > >
> > > Regards
> > >
> > > -D
> > >
> > > On Wed, Sep 11, 2019 at 7:06 PM Dan Tran <da...@gmail.com> wrote:
> > >
> > > > Hello Maven Users and Development Team
> > > >
> > > > Currently, artifact deployed as snapshot at Maven repository has the
> > > > following format
> > > >
> > > >      artifactId-version-timestamp-NN
> > > >
> > > > where NN auto-incremented at each maven module and the number varies
> > > >
> > > > Is there a way to use same snapshot NN for the entire multi-module
> > maven
> > > > build?
> > > >
> > > > If I have to implement a solution, would it be as an extension or I
> > have
> > > > to tinker with maven-deploy-plugin?
> > > >
> > > > Very appreciated any advice
> > > >
> > > > -D
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> 

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


Re: Same snapshot deploy number for entire build - possible

Posted by Dan Tran <da...@gmail.com>.
Looks like I need to clear thing a little bit

Assume I have a reactor of few hundreds of maven modules and my CI
build deploys snapshots, first few good builds, each module deployed to
maven repository have same snapshot number

Once we encounter a build failure at a module,  the snapshot number begins
to vary and over time, all modules no longer have the same snapshot number
anymore

To be able to determine a consistent snapshot number at each build,  I
would like to have an ability the tell deploy maven plugin to use an
assigned number for all modules.

Possible?

Thanks

-D






On Thu, Sep 12, 2019 at 11:31 PM Enrico Olivelli <eo...@gmail.com>
wrote:

> Dan,
> Are you running a single 'mvn deploy' or do you have multiple runs?
> I have never seen weird behaviours in multi module projects
>
> Cheers
> Enrico
>
> Il ven 13 set 2019, 08:19 Dan Tran <da...@gmail.com> ha scritto:
>
> > Hello, Maven dev
> >
> > any suggestion/thoughts on this issue are very much appreciated
> >
> > Regards
> >
> > -D
> >
> > On Wed, Sep 11, 2019 at 7:06 PM Dan Tran <da...@gmail.com> wrote:
> >
> > > Hello Maven Users and Development Team
> > >
> > > Currently, artifact deployed as snapshot at Maven repository has the
> > > following format
> > >
> > >      artifactId-version-timestamp-NN
> > >
> > > where NN auto-incremented at each maven module and the number varies
> > >
> > > Is there a way to use same snapshot NN for the entire multi-module
> maven
> > > build?
> > >
> > > If I have to implement a solution, would it be as an extension or I
> have
> > > to tinker with maven-deploy-plugin?
> > >
> > > Very appreciated any advice
> > >
> > > -D
> > >
> > >
> > >
> > >
> > >
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Dan Tran <da...@gmail.com>.
Looks like I need to clear thing a little bit

Assume I have a reactor of few hundreds of maven modules and my CI
build deploys snapshots, first few good builds, each module deployed to
maven repository have same snapshot number

Once we encounter a build failure at a module,  the snapshot number begins
to vary and over time, all modules no longer have the same snapshot number
anymore

To be able to determine a consistent snapshot number at each build,  I
would like to have an ability the tell deploy maven plugin to use an
assigned number for all modules.

Possible?

Thanks

-D






On Thu, Sep 12, 2019 at 11:31 PM Enrico Olivelli <eo...@gmail.com>
wrote:

> Dan,
> Are you running a single 'mvn deploy' or do you have multiple runs?
> I have never seen weird behaviours in multi module projects
>
> Cheers
> Enrico
>
> Il ven 13 set 2019, 08:19 Dan Tran <da...@gmail.com> ha scritto:
>
> > Hello, Maven dev
> >
> > any suggestion/thoughts on this issue are very much appreciated
> >
> > Regards
> >
> > -D
> >
> > On Wed, Sep 11, 2019 at 7:06 PM Dan Tran <da...@gmail.com> wrote:
> >
> > > Hello Maven Users and Development Team
> > >
> > > Currently, artifact deployed as snapshot at Maven repository has the
> > > following format
> > >
> > >      artifactId-version-timestamp-NN
> > >
> > > where NN auto-incremented at each maven module and the number varies
> > >
> > > Is there a way to use same snapshot NN for the entire multi-module
> maven
> > > build?
> > >
> > > If I have to implement a solution, would it be as an extension or I
> have
> > > to tinker with maven-deploy-plugin?
> > >
> > > Very appreciated any advice
> > >
> > > -D
> > >
> > >
> > >
> > >
> > >
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Enrico Olivelli <eo...@gmail.com>.
Dan,
Are you running a single 'mvn deploy' or do you have multiple runs?
I have never seen weird behaviours in multi module projects

Cheers
Enrico

Il ven 13 set 2019, 08:19 Dan Tran <da...@gmail.com> ha scritto:

> Hello, Maven dev
>
> any suggestion/thoughts on this issue are very much appreciated
>
> Regards
>
> -D
>
> On Wed, Sep 11, 2019 at 7:06 PM Dan Tran <da...@gmail.com> wrote:
>
> > Hello Maven Users and Development Team
> >
> > Currently, artifact deployed as snapshot at Maven repository has the
> > following format
> >
> >      artifactId-version-timestamp-NN
> >
> > where NN auto-incremented at each maven module and the number varies
> >
> > Is there a way to use same snapshot NN for the entire multi-module maven
> > build?
> >
> > If I have to implement a solution, would it be as an extension or I have
> > to tinker with maven-deploy-plugin?
> >
> > Very appreciated any advice
> >
> > -D
> >
> >
> >
> >
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Enrico Olivelli <eo...@gmail.com>.
Dan,
Are you running a single 'mvn deploy' or do you have multiple runs?
I have never seen weird behaviours in multi module projects

Cheers
Enrico

Il ven 13 set 2019, 08:19 Dan Tran <da...@gmail.com> ha scritto:

> Hello, Maven dev
>
> any suggestion/thoughts on this issue are very much appreciated
>
> Regards
>
> -D
>
> On Wed, Sep 11, 2019 at 7:06 PM Dan Tran <da...@gmail.com> wrote:
>
> > Hello Maven Users and Development Team
> >
> > Currently, artifact deployed as snapshot at Maven repository has the
> > following format
> >
> >      artifactId-version-timestamp-NN
> >
> > where NN auto-incremented at each maven module and the number varies
> >
> > Is there a way to use same snapshot NN for the entire multi-module maven
> > build?
> >
> > If I have to implement a solution, would it be as an extension or I have
> > to tinker with maven-deploy-plugin?
> >
> > Very appreciated any advice
> >
> > -D
> >
> >
> >
> >
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Dan Tran <da...@gmail.com>.
Hello, Maven dev

any suggestion/thoughts on this issue are very much appreciated

Regards

-D

On Wed, Sep 11, 2019 at 7:06 PM Dan Tran <da...@gmail.com> wrote:

> Hello Maven Users and Development Team
>
> Currently, artifact deployed as snapshot at Maven repository has the
> following format
>
>      artifactId-version-timestamp-NN
>
> where NN auto-incremented at each maven module and the number varies
>
> Is there a way to use same snapshot NN for the entire multi-module maven
> build?
>
> If I have to implement a solution, would it be as an extension or I have
> to tinker with maven-deploy-plugin?
>
> Very appreciated any advice
>
> -D
>
>
>
>
>

Re: Same snapshot deploy number for entire build - possible

Posted by Dan Tran <da...@gmail.com>.
Hello, Maven dev

any suggestion/thoughts on this issue are very much appreciated

Regards

-D

On Wed, Sep 11, 2019 at 7:06 PM Dan Tran <da...@gmail.com> wrote:

> Hello Maven Users and Development Team
>
> Currently, artifact deployed as snapshot at Maven repository has the
> following format
>
>      artifactId-version-timestamp-NN
>
> where NN auto-incremented at each maven module and the number varies
>
> Is there a way to use same snapshot NN for the entire multi-module maven
> build?
>
> If I have to implement a solution, would it be as an extension or I have
> to tinker with maven-deploy-plugin?
>
> Very appreciated any advice
>
> -D
>
>
>
>
>

Re: Same snapshot deploy number for entire build - possible

Posted by Dan Tran <da...@gmail.com>.
as stated before we are not cutting RC build at CI level.  We must stay
with snapshot until it is closed to release date, this is where we will use
CI friendly RC ( ie no more snaphots)

Clarification of to your problem statements:

1. QA needs projects built from the same revision and each snapshot
uploaded to maven repo must end with same snapshot buildNum
2. When the projects are built from the same revision, no one can verify
that easily when the build numbers are different.

-D

On Mon, Sep 16, 2019 at 11:46 AM Jason Young <ja...@procentive.com>
wrote:

> Dan,
>
> Thank you for clarifying the problem more. I think I understand better now.
>
> It sounds like there are really 2 problems:
> 1. QA needs projects built from the same revision.
> 2. When the projects are built from the same revision, no one can verify
> that easily because the build numbers are different.
>
> Is that correct?
>
> For the first problem, I think Tibor's example of using a CI pipeline to
> use the artifacts only if the whole reactor succeeds is what will work for
> most people (it's what my team does, in effect, just with a different CI
> tool).
>
> On Sun, Sep 15, 2019 at 5:35 PM Dan Tran <da...@gmail.com> wrote:
>
> > Please keep in mind QA is not a maven user.  All download/deployment and
> > testing are mostly automated, however, when come to reporting they have
> to
> > use something concrete which is the exact snapshot downloaded for them
> >
> > They also come to accept that each artifact has its own
> buildNo/snapshotNo,
> > but the same conversation keeps repeating about version inconsistency.  (
> > if you add Jenkins build number it does get worse).  My take here is to
> > find a way to unify the snapshotNum for the entire build, then the
> ongoing
> > problem will be fixed
> >
> > Speaking of implementation, I dig a litter deeper by debugging thru maven
> > deploy, but my IDE (eclipse) step debugger is out of syn ( maven deploy
> > 2.8.2 --> artifact-transfier-->maven-resolver)
> > so I dont have much luck getting more understanding of the code.
> Basically
> > I am looking for the exact place where Maven calculate the next snapshot
> > number
> >
> > Thanks
> >
> > -D
> >
> >
> >
> > On Sun, Sep 15, 2019 at 1:57 PM Tibor Digana <ti...@apache.org>
> > wrote:
> >
> > > Hi Francois and Dan,
> > >
> > > I understood it the same way as Francois mentioned. Not sure if NN in
> the
> > > format "artifactId-version-timestamp-NN" is a bug. Who cares is
> probably
> > > someone who downloads the artifact manually, maybe the QA.
> > > Also downloading the artifacts from Nexus never was so trivial for QA
> and
> > > development team.
> > > There's Nexus Proffessional and the Staging Repos but I found it useful
> > > only in OSS developers.
> > >
> > > What was found acceptable was the solution where the QA does not
> traverse
> > > the path of groupId/artifactId in the repo, and it was a simple button
> in
> > > GUI and automatic deployment. Something where nobody downloads the
> > artifact
> > > directly.
> > > My colleagues like integrating release candidates and not the
> Snapsthots
> > > because Snapshots are very volatile and the RCs are positively deployed
> > > ones or two times a month - rarely.
> > >
> > > If the Snapshots must be downloaded every day then the question is why
> > such
> > > processes exist in the company or what's wrong with the project
> > structures,
> > > and what is missing in the automatic deployment.
> > >
> > > Cheers
> > > Tibor17
> > >
> > >
> > >
> > > On Sun, Sep 15, 2019 at 10:15 PM Francois Marot <
> > francois.marot@gmail.com>
> > > wrote:
> > >
> > > > I'm sorry to insist but nevertheless I insist ;). I may have
> > > misunderstood
> > > > the problem but as I understand it, the whole problem can be sumed up
> > by:
> > > > " the fact that the repository adds a number at the end of the
> deployed
> > > > files is a problem because not all artifacts deployed from the same
> > > reactor
> > > > may not get the same suffix/number if some previous build failed half
> > > way".
> > > > I still do not see how it is a problem as it is only a problem if one
> > > wants
> > > > to get each files manually from the filesystem. In this case he does
> > not
> > > > know the *right* number for each artifact.
> > > > But if the QA want to download all the artifacts belonging to the
> > latest
> > > > build, all he has to do is create a pom.xml referencing all those
> > > artifact,
> > > > use a variable as the version number and use the dependency plugin (
> > > >
> > > >
> > >
> >
> https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
> > > > ) to retrieve the artifacts locally.
> > > >
> > > > This way, what you see as a problem is hust an internal
> implementation
> > > > detail of Maven/repository that you can circumvent easily.
> > > >
> > > > Again, I may have misunderstood so please excuse me if I'm talking
> > > nonsense
> > > > but I thought it could help.
> > > >
> > > > Regards
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > *- - - - -François Marot06 50 91 96 38*
> > > >
> > > >
> > > >
> > > > On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:
> > > >
> > > > > Hello Maven Users and Development Team
> > > > >
> > > > > Currently, artifact deployed as snapshot at Maven repository has
> the
> > > > > following format
> > > > >
> > > > >      artifactId-version-timestamp-NN
> > > > >
> > > > > where NN auto-incremented at each maven module and the number
> varies
> > > > >
> > > > > Is there a way to use same snapshot NN for the entire multi-module
> > > maven
> > > > > build?
> > > > >
> > > > > If I have to implement a solution, would it be as an extension or I
> > > have
> > > > to
> > > > > tinker with maven-deploy-plugin?
> > > > >
> > > > > Very appreciated any advice
> > > > >
> > > > > -D
> > > > >
> > > >
> > >
> >
>
>
> --
>

Re: Same snapshot deploy number for entire build - possible

Posted by Jason Young <ja...@procentive.com>.
Dan,

Thank you for clarifying the problem more. I think I understand better now.

It sounds like there are really 2 problems:
1. QA needs projects built from the same revision.
2. When the projects are built from the same revision, no one can verify
that easily because the build numbers are different.

Is that correct?

For the first problem, I think Tibor's example of using a CI pipeline to
use the artifacts only if the whole reactor succeeds is what will work for
most people (it's what my team does, in effect, just with a different CI
tool).

On Sun, Sep 15, 2019 at 5:35 PM Dan Tran <da...@gmail.com> wrote:

> Please keep in mind QA is not a maven user.  All download/deployment and
> testing are mostly automated, however, when come to reporting they have to
> use something concrete which is the exact snapshot downloaded for them
>
> They also come to accept that each artifact has its own buildNo/snapshotNo,
> but the same conversation keeps repeating about version inconsistency.  (
> if you add Jenkins build number it does get worse).  My take here is to
> find a way to unify the snapshotNum for the entire build, then the ongoing
> problem will be fixed
>
> Speaking of implementation, I dig a litter deeper by debugging thru maven
> deploy, but my IDE (eclipse) step debugger is out of syn ( maven deploy
> 2.8.2 --> artifact-transfier-->maven-resolver)
> so I dont have much luck getting more understanding of the code.  Basically
> I am looking for the exact place where Maven calculate the next snapshot
> number
>
> Thanks
>
> -D
>
>
>
> On Sun, Sep 15, 2019 at 1:57 PM Tibor Digana <ti...@apache.org>
> wrote:
>
> > Hi Francois and Dan,
> >
> > I understood it the same way as Francois mentioned. Not sure if NN in the
> > format "artifactId-version-timestamp-NN" is a bug. Who cares is probably
> > someone who downloads the artifact manually, maybe the QA.
> > Also downloading the artifacts from Nexus never was so trivial for QA and
> > development team.
> > There's Nexus Proffessional and the Staging Repos but I found it useful
> > only in OSS developers.
> >
> > What was found acceptable was the solution where the QA does not traverse
> > the path of groupId/artifactId in the repo, and it was a simple button in
> > GUI and automatic deployment. Something where nobody downloads the
> artifact
> > directly.
> > My colleagues like integrating release candidates and not the Snapsthots
> > because Snapshots are very volatile and the RCs are positively deployed
> > ones or two times a month - rarely.
> >
> > If the Snapshots must be downloaded every day then the question is why
> such
> > processes exist in the company or what's wrong with the project
> structures,
> > and what is missing in the automatic deployment.
> >
> > Cheers
> > Tibor17
> >
> >
> >
> > On Sun, Sep 15, 2019 at 10:15 PM Francois Marot <
> francois.marot@gmail.com>
> > wrote:
> >
> > > I'm sorry to insist but nevertheless I insist ;). I may have
> > misunderstood
> > > the problem but as I understand it, the whole problem can be sumed up
> by:
> > > " the fact that the repository adds a number at the end of the deployed
> > > files is a problem because not all artifacts deployed from the same
> > reactor
> > > may not get the same suffix/number if some previous build failed half
> > way".
> > > I still do not see how it is a problem as it is only a problem if one
> > wants
> > > to get each files manually from the filesystem. In this case he does
> not
> > > know the *right* number for each artifact.
> > > But if the QA want to download all the artifacts belonging to the
> latest
> > > build, all he has to do is create a pom.xml referencing all those
> > artifact,
> > > use a variable as the version number and use the dependency plugin (
> > >
> > >
> >
> https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
> > > ) to retrieve the artifacts locally.
> > >
> > > This way, what you see as a problem is hust an internal implementation
> > > detail of Maven/repository that you can circumvent easily.
> > >
> > > Again, I may have misunderstood so please excuse me if I'm talking
> > nonsense
> > > but I thought it could help.
> > >
> > > Regards
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > *- - - - -François Marot06 50 91 96 38*
> > >
> > >
> > >
> > > On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:
> > >
> > > > Hello Maven Users and Development Team
> > > >
> > > > Currently, artifact deployed as snapshot at Maven repository has the
> > > > following format
> > > >
> > > >      artifactId-version-timestamp-NN
> > > >
> > > > where NN auto-incremented at each maven module and the number varies
> > > >
> > > > Is there a way to use same snapshot NN for the entire multi-module
> > maven
> > > > build?
> > > >
> > > > If I have to implement a solution, would it be as an extension or I
> > have
> > > to
> > > > tinker with maven-deploy-plugin?
> > > >
> > > > Very appreciated any advice
> > > >
> > > > -D
> > > >
> > >
> >
>


--

Re: Same snapshot deploy number for entire build - possible

Posted by Tamás Cservenák <ta...@cservenak.net>.
@Dan see here

https://github.com/apache/maven/blob/master/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadata.java

On Mon, Sep 16, 2019, 00:35 Dan Tran <da...@gmail.com> wrote:

> Please keep in mind QA is not a maven user.  All download/deployment and
> testing are mostly automated, however, when come to reporting they have to
> use something concrete which is the exact snapshot downloaded for them
>
> They also come to accept that each artifact has its own buildNo/snapshotNo,
> but the same conversation keeps repeating about version inconsistency.  (
> if you add Jenkins build number it does get worse).  My take here is to
> find a way to unify the snapshotNum for the entire build, then the ongoing
> problem will be fixed
>
> Speaking of implementation, I dig a litter deeper by debugging thru maven
> deploy, but my IDE (eclipse) step debugger is out of syn ( maven deploy
> 2.8.2 --> artifact-transfier-->maven-resolver)
> so I dont have much luck getting more understanding of the code.  Basically
> I am looking for the exact place where Maven calculate the next snapshot
> number
>
> Thanks
>
> -D
>
>
>
> On Sun, Sep 15, 2019 at 1:57 PM Tibor Digana <ti...@apache.org>
> wrote:
>
> > Hi Francois and Dan,
> >
> > I understood it the same way as Francois mentioned. Not sure if NN in the
> > format "artifactId-version-timestamp-NN" is a bug. Who cares is probably
> > someone who downloads the artifact manually, maybe the QA.
> > Also downloading the artifacts from Nexus never was so trivial for QA and
> > development team.
> > There's Nexus Proffessional and the Staging Repos but I found it useful
> > only in OSS developers.
> >
> > What was found acceptable was the solution where the QA does not traverse
> > the path of groupId/artifactId in the repo, and it was a simple button in
> > GUI and automatic deployment. Something where nobody downloads the
> artifact
> > directly.
> > My colleagues like integrating release candidates and not the Snapsthots
> > because Snapshots are very volatile and the RCs are positively deployed
> > ones or two times a month - rarely.
> >
> > If the Snapshots must be downloaded every day then the question is why
> such
> > processes exist in the company or what's wrong with the project
> structures,
> > and what is missing in the automatic deployment.
> >
> > Cheers
> > Tibor17
> >
> >
> >
> > On Sun, Sep 15, 2019 at 10:15 PM Francois Marot <
> francois.marot@gmail.com>
> > wrote:
> >
> > > I'm sorry to insist but nevertheless I insist ;). I may have
> > misunderstood
> > > the problem but as I understand it, the whole problem can be sumed up
> by:
> > > " the fact that the repository adds a number at the end of the deployed
> > > files is a problem because not all artifacts deployed from the same
> > reactor
> > > may not get the same suffix/number if some previous build failed half
> > way".
> > > I still do not see how it is a problem as it is only a problem if one
> > wants
> > > to get each files manually from the filesystem. In this case he does
> not
> > > know the *right* number for each artifact.
> > > But if the QA want to download all the artifacts belonging to the
> latest
> > > build, all he has to do is create a pom.xml referencing all those
> > artifact,
> > > use a variable as the version number and use the dependency plugin (
> > >
> > >
> >
> https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
> > > ) to retrieve the artifacts locally.
> > >
> > > This way, what you see as a problem is hust an internal implementation
> > > detail of Maven/repository that you can circumvent easily.
> > >
> > > Again, I may have misunderstood so please excuse me if I'm talking
> > nonsense
> > > but I thought it could help.
> > >
> > > Regards
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > *- - - - -François Marot06 50 91 96 38*
> > >
> > >
> > >
> > > On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:
> > >
> > > > Hello Maven Users and Development Team
> > > >
> > > > Currently, artifact deployed as snapshot at Maven repository has the
> > > > following format
> > > >
> > > >      artifactId-version-timestamp-NN
> > > >
> > > > where NN auto-incremented at each maven module and the number varies
> > > >
> > > > Is there a way to use same snapshot NN for the entire multi-module
> > maven
> > > > build?
> > > >
> > > > If I have to implement a solution, would it be as an extension or I
> > have
> > > to
> > > > tinker with maven-deploy-plugin?
> > > >
> > > > Very appreciated any advice
> > > >
> > > > -D
> > > >
> > >
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Dan Tran <da...@gmail.com>.
Please keep in mind QA is not a maven user.  All download/deployment and
testing are mostly automated, however, when come to reporting they have to
use something concrete which is the exact snapshot downloaded for them

They also come to accept that each artifact has its own buildNo/snapshotNo,
but the same conversation keeps repeating about version inconsistency.  (
if you add Jenkins build number it does get worse).  My take here is to
find a way to unify the snapshotNum for the entire build, then the ongoing
problem will be fixed

Speaking of implementation, I dig a litter deeper by debugging thru maven
deploy, but my IDE (eclipse) step debugger is out of syn ( maven deploy
2.8.2 --> artifact-transfier-->maven-resolver)
so I dont have much luck getting more understanding of the code.  Basically
I am looking for the exact place where Maven calculate the next snapshot
number

Thanks

-D



On Sun, Sep 15, 2019 at 1:57 PM Tibor Digana <ti...@apache.org> wrote:

> Hi Francois and Dan,
>
> I understood it the same way as Francois mentioned. Not sure if NN in the
> format "artifactId-version-timestamp-NN" is a bug. Who cares is probably
> someone who downloads the artifact manually, maybe the QA.
> Also downloading the artifacts from Nexus never was so trivial for QA and
> development team.
> There's Nexus Proffessional and the Staging Repos but I found it useful
> only in OSS developers.
>
> What was found acceptable was the solution where the QA does not traverse
> the path of groupId/artifactId in the repo, and it was a simple button in
> GUI and automatic deployment. Something where nobody downloads the artifact
> directly.
> My colleagues like integrating release candidates and not the Snapsthots
> because Snapshots are very volatile and the RCs are positively deployed
> ones or two times a month - rarely.
>
> If the Snapshots must be downloaded every day then the question is why such
> processes exist in the company or what's wrong with the project structures,
> and what is missing in the automatic deployment.
>
> Cheers
> Tibor17
>
>
>
> On Sun, Sep 15, 2019 at 10:15 PM Francois Marot <fr...@gmail.com>
> wrote:
>
> > I'm sorry to insist but nevertheless I insist ;). I may have
> misunderstood
> > the problem but as I understand it, the whole problem can be sumed up by:
> > " the fact that the repository adds a number at the end of the deployed
> > files is a problem because not all artifacts deployed from the same
> reactor
> > may not get the same suffix/number if some previous build failed half
> way".
> > I still do not see how it is a problem as it is only a problem if one
> wants
> > to get each files manually from the filesystem. In this case he does not
> > know the *right* number for each artifact.
> > But if the QA want to download all the artifacts belonging to the latest
> > build, all he has to do is create a pom.xml referencing all those
> artifact,
> > use a variable as the version number and use the dependency plugin (
> >
> >
> https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
> > ) to retrieve the artifacts locally.
> >
> > This way, what you see as a problem is hust an internal implementation
> > detail of Maven/repository that you can circumvent easily.
> >
> > Again, I may have misunderstood so please excuse me if I'm talking
> nonsense
> > but I thought it could help.
> >
> > Regards
> >
> >
> >
> >
> >
> >
> >
> > *- - - - -François Marot06 50 91 96 38*
> >
> >
> >
> > On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:
> >
> > > Hello Maven Users and Development Team
> > >
> > > Currently, artifact deployed as snapshot at Maven repository has the
> > > following format
> > >
> > >      artifactId-version-timestamp-NN
> > >
> > > where NN auto-incremented at each maven module and the number varies
> > >
> > > Is there a way to use same snapshot NN for the entire multi-module
> maven
> > > build?
> > >
> > > If I have to implement a solution, would it be as an extension or I
> have
> > to
> > > tinker with maven-deploy-plugin?
> > >
> > > Very appreciated any advice
> > >
> > > -D
> > >
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Tibor Digana <ti...@apache.org>.
Hi Francois and Dan,

I understood it the same way as Francois mentioned. Not sure if NN in the
format "artifactId-version-timestamp-NN" is a bug. Who cares is probably
someone who downloads the artifact manually, maybe the QA.
Also downloading the artifacts from Nexus never was so trivial for QA and
development team.
There's Nexus Proffessional and the Staging Repos but I found it useful
only in OSS developers.

What was found acceptable was the solution where the QA does not traverse
the path of groupId/artifactId in the repo, and it was a simple button in
GUI and automatic deployment. Something where nobody downloads the artifact
directly.
My colleagues like integrating release candidates and not the Snapsthots
because Snapshots are very volatile and the RCs are positively deployed
ones or two times a month - rarely.

If the Snapshots must be downloaded every day then the question is why such
processes exist in the company or what's wrong with the project structures,
and what is missing in the automatic deployment.

Cheers
Tibor17



On Sun, Sep 15, 2019 at 10:15 PM Francois Marot <fr...@gmail.com>
wrote:

> I'm sorry to insist but nevertheless I insist ;). I may have misunderstood
> the problem but as I understand it, the whole problem can be sumed up by:
> " the fact that the repository adds a number at the end of the deployed
> files is a problem because not all artifacts deployed from the same reactor
> may not get the same suffix/number if some previous build failed half way".
> I still do not see how it is a problem as it is only a problem if one wants
> to get each files manually from the filesystem. In this case he does not
> know the *right* number for each artifact.
> But if the QA want to download all the artifacts belonging to the latest
> build, all he has to do is create a pom.xml referencing all those artifact,
> use a variable as the version number and use the dependency plugin (
>
> https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
> ) to retrieve the artifacts locally.
>
> This way, what you see as a problem is hust an internal implementation
> detail of Maven/repository that you can circumvent easily.
>
> Again, I may have misunderstood so please excuse me if I'm talking nonsense
> but I thought it could help.
>
> Regards
>
>
>
>
>
>
>
> *- - - - -François Marot06 50 91 96 38*
>
>
>
> On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:
>
> > Hello Maven Users and Development Team
> >
> > Currently, artifact deployed as snapshot at Maven repository has the
> > following format
> >
> >      artifactId-version-timestamp-NN
> >
> > where NN auto-incremented at each maven module and the number varies
> >
> > Is there a way to use same snapshot NN for the entire multi-module maven
> > build?
> >
> > If I have to implement a solution, would it be as an extension or I have
> to
> > tinker with maven-deploy-plugin?
> >
> > Very appreciated any advice
> >
> > -D
> >
>

Re: Same snapshot deploy number for entire build - possible

Posted by Francois Marot <fr...@gmail.com>.
I'm sorry to insist but nevertheless I insist ;). I may have misunderstood
the problem but as I understand it, the whole problem can be sumed up by:
" the fact that the repository adds a number at the end of the deployed
files is a problem because not all artifacts deployed from the same reactor
may not get the same suffix/number if some previous build failed half way".
I still do not see how it is a problem as it is only a problem if one wants
to get each files manually from the filesystem. In this case he does not
know the *right* number for each artifact.
But if the QA want to download all the artifacts belonging to the latest
build, all he has to do is create a pom.xml referencing all those artifact,
use a variable as the version number and use the dependency plugin (
https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
) to retrieve the artifacts locally.

This way, what you see as a problem is hust an internal implementation
detail of Maven/repository that you can circumvent easily.

Again, I may have misunderstood so please excuse me if I'm talking nonsense
but I thought it could help.

Regards







*- - - - -François Marot06 50 91 96 38*



On Thu, 12 Sep 2019 at 04:07, Dan Tran <da...@gmail.com> wrote:

> Hello Maven Users and Development Team
>
> Currently, artifact deployed as snapshot at Maven repository has the
> following format
>
>      artifactId-version-timestamp-NN
>
> where NN auto-incremented at each maven module and the number varies
>
> Is there a way to use same snapshot NN for the entire multi-module maven
> build?
>
> If I have to implement a solution, would it be as an extension or I have to
> tinker with maven-deploy-plugin?
>
> Very appreciated any advice
>
> -D
>