You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by he...@sap.com on 2017/04/06 18:36:57 UTC

how to get the latest build for dependency

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.  


RE: how to get the latest build for dependency

Posted by "Magnanao, Hector" <he...@sap.com>.
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:philip@whiuk.com]
Sent: Thursday, April 6, 2017 1:41 PM
To: Maven Users List <us...@maven.apache.org>; Magnanao, Hector <he...@sap.com>; Maven users <ma...@googlegroups.com>
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, hector.magnanao@sap.com<ma...@sap.com> 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.

Re: how to get the latest build for dependency

Posted by Philip Whitehouse <ph...@whiuk.com>.
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, hector.magnanao@sap.com 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.

Re: how to get the latest build for dependency

Posted by Elliot Huntington <el...@gmail.com>.
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" <bi...@billmairsolutions.ltd.uk> 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" <bi...@billmairsolutions.ltd.uk>
<bi...@billmairsolutions.ltd.uk> 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>
<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.





-- 
[image: BMS Logo] *Bill Mair*
Director
Email : bill@billmairsolutions.ltd.uk
Tel. (UK): +44(0)-7427-802931 <+44%207427%20802931>
Tel. (DE): +49(0)-157-85693835 <+49%201578%205693835>
www.billmairsolutions.ltd.uk
Bill Mair Solutions Limited, Registered in England, Company No. 08556864
Registered office: 183 Walsall Road, Great Wyrley, Walsall, WS6 6NL

Re: how to get the latest build for dependency

Posted by Bill Mair <bi...@billmairsolutions.ltd.uk>.
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" <bi...@billmairsolutions.ltd.uk> 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 : bill@billmairsolutions.ltd.uk <ma...@billmairsolutions.ltd.uk>
Tel. (UK): +44(0)-7427-802931
Tel. (DE): +49(0)-157-85693835
www.billmairsolutions.ltd.uk <http://www.billmairsolutions.ltd.uk>
Bill Mair Solutions Limited, Registered in England, Company No. 08556864
Registered office: 183 Walsall Road, Great Wyrley, Walsall, WS6 6NL


Re: how to get the latest build for dependency

Posted by Elliot Huntington <el...@gmail.com>.
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" <bi...@billmairsolutions.ltd.uk> 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.
>
>
>

Re: how to get the latest build for dependency

Posted by Bill Mair <bi...@billmairsolutions.ltd.uk>.
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.