Quantcast

how to get the latest build for dependency

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to get the latest build for dependency

Magnanao, Hector
I have to 2 java projects a and b in maven.  The B project uses the A build as a dependency.  How do I ensure the whenever the A project has a new build,  the B project will always use that latest build in A.  A is being built with a unique build number each time it gets built.  So is A has build # 10 as the newest build,  the B project has to use build #10 of A. 



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to get the latest build for dependency

Philip Whitehouse
Unless you're actually releasing the builds, just use SNAPSHOT.

Otherwise use [minimumVersion, ) and it will resolve to the latest.

On 6 April 2017 19:36:57 BST, [hidden email] wrote:
>I have to 2 java projects a and b in maven.  The B project uses the A
>build
>as a dependency.  How do I ensure the whenever the A project has a new
>build,  the B project will always use that latest build in A.  A is
>being
>built with a unique build number each time it gets built.  So is A has
>build # 10 as the newest build,  the B project has to use build #10 of
>A.  

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to get the latest build for dependency

Bill Mair
In reply to this post by Magnanao, Hector
See: http://www.mojohaus.org/versions-maven-plugin/

In particular "mvn versions:display-dependency-updates
<http://www.mojohaus.org/versions-maven-plugin/examples/display-dependency-updates.html>"
- The display-dependency-updates goal will check all the dependencies
used in your project and display a list of those dependencies with newer
versions available.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to get the latest build for dependency

Elliot Huntington
This is not a good practice to follow if you want reproducible builds. It
is better to manage your dependencies manually.

On Apr 6, 2017 11:56 AM, "Bill Mair" <[hidden email]> wrote:

> See: http://www.mojohaus.org/versions-maven-plugin/
>
> In particular "mvn versions:display-dependency-updates
> <http://www.mojohaus.org/versions-maven-plugin/
> examples/display-dependency-updates.html>"
> - The display-dependency-updates goal will check all the dependencies
> used in your project and display a list of those dependencies with newer
> versions available.
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to get the latest build for dependency

Bill Mair

I pointed to "display-dependency-updates", it ONLY lists the available updates and you have to edit the pom yourself.

Why is that bad practice?


On 06/04/17 21:01, Elliot Huntington wrote:
This is not a good practice to follow if you want reproducible builds. It
is better to manage your dependencies manually.

On Apr 6, 2017 11:56 AM, "Bill Mair" [hidden email] wrote:

See: http://www.mojohaus.org/versions-maven-plugin/

In particular "mvn versions:display-dependency-updates
<http://www.mojohaus.org/versions-maven-plugin/
examples/display-dependency-updates.html>"
- The display-dependency-updates goal will check all the dependencies
used in your project and display a list of those dependencies with newer
versions available.




    

--
BMS Logo Bill Mair
Director
Email : [hidden email]
Tel. (UK): +44(0)-7427-802931
Tel. (DE): +49(0)-157-85693835
www.billmairsolutions.ltd.uk
Bill Mair Solutions Limited, Registered in England, Company No. 08556864
Registered office: 183 Walsall Road, Great Wyrley, Walsall, WS6 6NL
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: how to get the latest build for dependency

Magnanao, Hector
In reply to this post by Philip Whitehouse
The problem with just using SNAPSHOT is that, we need to build A with its own unique build number for versioning purpose.

In your other comment,  if I use the minimum version,  do I still have to always update the pom file in the B project so it gets the minimum version of build A ?

From: Philip Whitehouse [mailto:[hidden email]]
Sent: Thursday, April 6, 2017 1:41 PM
To: Maven Users List <[hidden email]>; Magnanao, Hector <[hidden email]>; Maven users <[hidden email]>
Subject: Re: how to get the latest build for dependency

Unless you're actually releasing the builds, just use SNAPSHOT.

Otherwise use [minimumVersion, ) and it will resolve to the latest.
On 6 April 2017 19:36:57 BST, [hidden email]<mailto:[hidden email]> wrote:
I have to 2 java projects a and b in maven.  The B project uses the A build as a dependency.  How do I ensure the whenever the A project has a new build,  the B project will always use that latest build in A.  A is being built with a unique build number each time it gets built.  So is A has build # 10 as the newest build,  the B project has to use build #10 of A.


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to get the latest build for dependency

Elliot Huntington
In reply to this post by Bill Mair
I'm sorry. I wasn't referring to using "mvn versions:display-dependency-updates" as a bad practice. That tool is really helpful. What I meant to identify as not being a good practice is to use dependency ranges [,).


On Apr 6, 2017 12:03 PM, "Bill Mair" <[hidden email]> wrote:

I pointed to "display-dependency-updates", it ONLY lists the available updates and you have to edit the pom yourself.

Why is that bad practice?


On 06/04/17 21:01, Elliot Huntington wrote:
This is not a good practice to follow if you want reproducible builds. It
is better to manage your dependencies manually.

On Apr 6, 2017 11:56 AM, "Bill Mair" [hidden email] wrote:

See: http://www.mojohaus.org/versions-maven-plugin/

In particular "mvn versions:display-dependency-updates
<http://www.mojohaus.org/versions-maven-plugin/
examples/display-dependency-updates.html>"
- The display-dependency-updates goal will check all the dependencies
used in your project and display a list of those dependencies with newer
versions available.




--
Bill Mair
Director
Email : [hidden email]
Tel. (UK): <a href="tel:+44%207427%20802931" value="+447427802931" target="_blank">+44(0)-7427-802931
Tel. (DE): <a href="tel:+49%201578%205693835" value="+4915785693835" target="_blank">+49(0)-157-85693835
www.billmairsolutions.ltd.uk
Bill Mair Solutions Limited, Registered in England, Company No. 08556864
Registered office: 183 Walsall Road, Great Wyrley, Walsall, WS6 6NL

Loading...