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

Re: Same snapshot deploy number for entire build - possible

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 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
> >
> >
> >
> >
> >
>