Orjan,

You can found this in one of Brett's email with the subject : [m2] reasons for sticking with maven.

May that helps.

R

Here comes the extract :

Dependency ranges:
- Ivy supports simple notation of 2.1+ which is equivalent to Maven's [2.1,
3.0)
- Maven supports any range you can specify, using set notation, eg [1.0,1.4
),(1.4,2.0) which is the latest 1.x version that fits, but I don't want 1.4. I expect this would be rarely used, but it is powerful.


Orjan Austvold a écrit :

In an eager attempt I came to specify a couple of dependencies in a parent-pom of a plugin as

            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-project</artifactId>
                <version>[2.0-beta-1,)</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-plugin-api</artifactId>
                <version>[2.0-beta-1,)</version>
            </dependency>

After some fiddling I found out that this was the reason for a NPE in my build.

java.lang.NullPointerException: version was null for org.apache.maven:maven-plugin-api at org.apache.maven.artifact.DefaultArtifact.getBaseVersion(DefaultArtifact.java:311) at org.apache.maven.artifact.DefaultArtifact.getId(DefaultArtifact.java:208)
...

I could not find any information on the maven2 site about ranged deps so I guess they are not supported (yet)?

Best regards,
Ørjan



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to