Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] POM Version Syntax

Hi Troy,

> I have a Gradle build that publishes artifacts to an Artifactory
> server.  The Gradle build scripts allow "+" in the version for
> dependency declaration like the following.
> 
> compile group: 'junit', name: 'junit', version: '4.+'
> 
> After the build Gradle will publish the resulting artifact to the
> Artifactory repository along with a newly built POM for it, and the POM
> will contain the following:
> 
> <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>4.+</version>
>       <scope>compile</scope>
> </dependency>

Disclaimer: I am just another user of Aether, not one of its developers

This looks like Gradle creates malformed POMs. AFAIK, the syntax of
version ranges is as documented here [1]. so Gradle should have taken
its own syntax of 4.+ and converted it to [4,) or [4,5) (I am not sure
what exactly Gradle's '+' means, but its probably one or the other) in
the generated POM.

I don't think Aether will (or should) be able to cope with any kind of
malformed POM out there; the above looks more like a bug with Gradle or
your use of it.

Hope this helps,

Andreas

[1]
<http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-project-dependencies.html#pom-relationships-sect-version-ranges>

-- 
Codetrails GmbH
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Phone: +49-6151-276-7092
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940


Back to the top