maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: Which is the BEST Approach to define Global POM.XML
Date Fri, 16 Mar 2012 06:58:08 GMT
Always depend on a release version

Keep in mind that the build must be reproducible, so old releases will
build with the parent that was most recent at the time they were released

mvn versions:update-parent

Is your friend

On Friday, 16 March 2012, Daivish Shah <daivish.shah@gmail.com> wrote:
> Hi,
>
> What if we want to change the version of the corporate POM ?
>
> At that time we have to change at all projects to use this ?
>
> <parent>
>    <groupId>com.mosabuam.maven</groupId>
>    <artifactId>super-pom</artifactId>
>    <version>0.1</version>
> </parent>
>
> We are at the starting stage of MAVEN implementation throughout the
COMPANY
> so we expected to see lot of changes in this project.
>
> What is the best practice on that too ? We have to select this project
> version as SNAPSHOT for all the time ?
>
>
> OR we have to use the RANGE ?
>
>
> Dependency Version Ranges
>
> Need to be able to declare minimum, maximum allowed versions of a
> dependency (both min and max may be optional), and allow "holes" for known
> incompatible versions.
>
> Proposed syntax:
>
> Range
>
> Meaning
>
> (,1.0]
>
> x <= 1.0
>
> 1.0
>
> "Soft" requirement on 1.0 (just a recommendation - helps select the
correct
> version if it matches all ranges)
>
> [1.0]
>
> Hard requirement on 1.0
>
> [1.2,1.3]
>
> 1.2 <= x <= 1.3
>
> [1.0,2.0)
>
> 1.0 <= x < 2.0
>
> [1.5,)
>
> x >= 1.5
>
> (,1.0],[1.2,)
>
> x <= 1.0 or x >= 1.2. Multiple sets are comma-separated
>
> (,1.1),(1.1,)
>
> This excludes 1.1 if it is known not to work in combination with this
> library
>
> Mathematical syntax chosen to avoid the use of - as it would conflict with
> what is used in many version number, and because < and >= doesn't look
nice
> in XML. (,1.0] is used because infinity is not really helpful here.
>
> Default strategy: Of the overlapping ranges, the highest soft requirement
> is the version to be used. If there are no soft requirements inside the
> prescribed ranges, the most recent version is used. If that does not fit
> the described ranges, then the most recent version number in the
prescribed
> ranges is used. If the ranges exclude all versions, an error occurs.
>
> Addition of ranges leads to additional necessary specifications on the
> dependency element.
>
>
>
> Looking for correct Approach on this.
>
>
> thanks,
> daivish.
>
> On Thu, Mar 15, 2012 at 12:47 PM, Marcin Kuthan <marcin.kuthan@gmail.com
>wrote:
>
>> I hope this example helps:
>>
>>
>>
http://code.google.com/p/m4enterprise/source/browse/trunk/corporate-pom/pom.xml
>>
>> Marcin
>>
>> On 14 March 2012 21:29, Daivish Shah <daivish.shah@gmail.com> wrote:
>>
>> > Hi Maven Team,
>> >
>> > I am trying to find out what is the best way to define company specific
>> > GLOBAL POM.XML. Which each team can inherit it in EACH Projects.
>> >
>> > Can some one provide me guideline on that ? Is that going to be profile
>> or
>> > just simple POM.XML ? And how to inherit that. Please provide me
>> guideline
>> > to implement it. As this is very critical before we implement all
>> projects
>> > with MAVEN.
>> >
>> > Thanks,
>> > Daivish.
>> >
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message