Hi,
I have also seen the "best practice" to have the versioning of parent
POM separated from the rest and to not use "-SNAPSHOT" for parent
versions. The reason is that parents don't change that much that you
need the SNAPSHOT concept.
We could define version "1" or whatever for the parent and use this to
refer to the parent POM. The idea behind ${stanbol-version} was once
to ensure that all components have the same version number. We decided
that we don't need different versions for components. This could be
ensured by a global variable. But perhaps this is not valid anymore
today. It is from "old IKS times" ;)
Personally, I had some bad experiences with Maven release plugin but
maybe those problems are solved in newer versions. I tried to use it
two years ago and it was a lot of trouble in complex project
structures.
Best,
- Fabian
2011/3/31 Rupert Westenthaler <[email protected]>:
> Hi
>
>
>
> On Thu, Mar 31, 2011 at 2:24 PM, Bertrand Delacretaz
> <[email protected]> wrote:
>> Hi,
>>
>> mvn help:effective-pom (for example) fails with Maven 3 because of
>> this in most stanbol POMs:
>>
>> <parent>
>> <groupId>org.apache.stanbol</groupId>
>> <artifactId>stanbol-parent</artifactId>
>> <version>${stanbol-version}</version>
>> <relativePath>parent</relativePath>
>> </parent>
>>
>> And stanbol-version is defined in the parent pom, creating a
>> chicken-and-egg problem.
>>
>> For some reason Maven 2 accepts that, but I think it's wrong anyway,
>> version numbers should be constants in general, and especially when
>> pointing to the parent pom. I think variable version numbers will
>> cause problems with the Maven release plugin, at least.
>>
>> Can we change to constants for version numbers, or what was the idea
>> behind this?
>
> I changed the links to the parent from "0.9-SNAMPSHOT" to
> "${stanbol-version} because the build was not working (with Maven 2)
> if the stanbol bundles where not already present within the local
> cache. Using the variable solved this problem.
>
> If this causes problems with Maven 3 than I think we should define the
> version within the parent statically to "0.9-SNAPSHOT".
>
> best
> Rupert Westenthaler
>
>>
>> -Bertrand
>>
>> (workaround is to add -Dstanbol-version=0.9-SNAPSHOT to the mvn
>> command line in the meantime)
>>
>
>
>
> --
> | Rupert Westenthaler [email protected]
> | Bodenlehenstraße 11 ++43-699-11108907
> | A-5500 Bischofshofen
>
--
Fabian