You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jo...@barclayscapital.com on 2012/02/17 15:53:22 UTC

How to make sure developers use the latest versions of dependencies?

Hello Maven users,

I managed to convert and connect several projects through dependencies using Maven;  I do daily releases and I change the version of the aggregator pom of all the projects using 'mvn versions:set -DnewVersion=XXXXX' . But I have the following problem:


-          My developers have their own private branches and I do not update their poms. That means they use old dependencies the next day and this potentially can cause problems when they decide to integrate into the trunk (we have continuous integration builds to detect this but still it is too late by then)

-          They can still update their own dependencies but they are forced to do it on daily basis

There is a way to:

-          Tell the Maven pom to retrieve the 'HEAD' of the release version every time, so there is not need to put a specific version on the pom file?

-          Is this something that can be solved with Snapshots?  Maybe I can deploy both to the release and the snapshot (using profiles?)


I'm interested to see how you guys solved this issue (I went through the documentation but it is not clear to me how to proceed).

Regards,

--Jose

_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________

RE: How to make sure developers use the latest versions of dependencies?

Posted by jo...@barclayscapital.com.
Thanks for your help Wayne,

I'll dig further in the documentation and will come back to the list if I have more questions.

--Jose

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Friday, February 17, 2012 10:37 AM
To: Maven Users List
Subject: Re: How to make sure developers use the latest versions of dependencies?

> -          Tell the Maven pom to retrieve the 'HEAD' of the release version every time, so there is not need to put a specific version on the pom file?

No.

> -          Is this something that can be solved with Snapshots?  Maybe I can deploy both to the release and the snapshot (using profiles?)

Yes, this is exactly what many people use SNAPSHOTs for. You keep the
version as eg 1.4-SNAPSHOT until you have completed the features you
had planned for that version and then release 1.4, then bump your
version to 1.5-SNAPSHOT (and you can always use a 1.4.1-SNAPSHOT
branch for bug fixes etc).

While you are building and deploying SNAPSHOTs on a daily basis, Maven
instances should automatically see them and pick them up the next time
your coworkers do their own builds. The frequency of checking for
these updates in the repo (I assume you are using a Repo Manager like
Nexus etc) is set in settings.xml.

This forces something of a design by contract approach to your own
code and APIs which is a good thing.

Wayne

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


_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________

Re: How to make sure developers use the latest versions of dependencies?

Posted by Wayne Fay <wa...@gmail.com>.
> -          Tell the Maven pom to retrieve the 'HEAD' of the release version every time, so there is not need to put a specific version on the pom file?

No.

> -          Is this something that can be solved with Snapshots?  Maybe I can deploy both to the release and the snapshot (using profiles?)

Yes, this is exactly what many people use SNAPSHOTs for. You keep the
version as eg 1.4-SNAPSHOT until you have completed the features you
had planned for that version and then release 1.4, then bump your
version to 1.5-SNAPSHOT (and you can always use a 1.4.1-SNAPSHOT
branch for bug fixes etc).

While you are building and deploying SNAPSHOTs on a daily basis, Maven
instances should automatically see them and pick them up the next time
your coworkers do their own builds. The frequency of checking for
these updates in the repo (I assume you are using a Repo Manager like
Nexus etc) is set in settings.xml.

This forces something of a design by contract approach to your own
code and APIs which is a good thing.

Wayne

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