You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Roshan A. Punnoose" <rp...@proteus-technologies.com> on 2007/10/09 19:01:11 UTC

Version ranges

Looking at the documentation on the site and Codehaus, I could not find
the best way to specify to get the latest release as a version range. I
tried (0.0,) and it did not seem to work properly for all types of
version strings. In particular, the version string: 1.0.0.N20071011 does
not get picked up using that version range. Any ideas?

 

Roshan


RE: Version ranges

Posted by "Roshan A. Punnoose" <rp...@proteus-technologies.com>.
Yeah, it looks like maven doesn't like the version 1.0.0.N20071001-0010. When I changed this to 1.0.0-N20071001-0010, it worked. (This is actually compliant with the docs on maven's website for version info)


Roshan


-----Original Message-----
From: Dave Hoffer [mailto:DHoffer@xrite.com]
Sent: Tue 10/9/2007 6:01 PM
To: Maven Users List
Subject: RE: Version ranges
 
Just for fun try [0.0,) this means version 0.0 or later.

Also, I don't know how maven treats 1.0.0.N20071001-0010; this isn't a
standard release version.

I don't see anything else.

-Dave

-----Original Message-----
From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com] 
Sent: Tuesday, October 09, 2007 5:50 PM
To: Maven Users List
Subject: RE: Version ranges

I am trying to develop/extend the maven-pst plugin. Basically, this
plugin will read through the eclipse plugins directory and load these
plugins as artifacts in the repository. (This already works)

Then when I create an eclipse plugin project and run a mvn clean package
on it, it uses the a mojo to convert the Manifest file in the project,
using the require bundle property, to populate the POM before loading
the dependencies. Because most of the time the manifest file will not
hold the dependency version information, I want to specify a version
range that will get the latest and greatest release from the repository.
I was using a version range of (0.0,) because not all eclipse plugins
have reached the 1.0 and later stage. However, this does not seem to be
working.

My maven-metadata.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?><metadata>
  <groupId>org.eclipse</groupId>
  <artifactId>org.eclipse.equinox.jmx.client</artifactId>
  <version>1.0.0.N20071001-0010</version>
  <versioning>
    <versions>
      <version>1.0.0.N20071001-0010</version>
    </versions>
    <lastUpdated>20071009213825</lastUpdated>
  </versioning>
</metadata>

Which should mean that if I have this in my pom.xml:

<dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>org.eclipse.equinox.jmx.client</artifactId>
      <version>(0.0,)</version>
    </dependency>

then it should pick it up, but that doesn't work. It only works if I set
the version exactly right:
<dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>org.eclipse.equinox.jmx.client</artifactId>
      <version>1.0.0.N20071001-0010</version>
    </dependency>


Maybe the reason this isn't working is because version ranges do not use
the local repository? Which is where I have installed all my eclipse
plugins. Do I need to specify directly that they are releases in the
maven-metadata.xml?

Roshan

-----Original Message-----
From: Dave Hoffer [mailto:DHoffer@xrite.com]
Sent: Tue 10/9/2007 4:21 PM
To: Maven Users List
Subject: RE: Version ranges
 
Is version 1.0.0.N20071011 a released or snapshot version?  Version
ranges are not supposed to get snapshots unless specifically part of the
version range (but the current code does not handle this properly).

We use version ranges all the time and the general form of [1.0,) will
find any released version 1.0 or greater.  I'm not sure what your
example does because you are excluding version 0.0.

-Dave

-----Original Message-----
From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com] 
Sent: Tuesday, October 09, 2007 1:01 PM
To: users@maven.apache.org
Subject: Version ranges

Looking at the documentation on the site and Codehaus, I could not find
the best way to specify to get the latest release as a version range. I
tried (0.0,) and it did not seem to work properly for all types of
version strings. In particular, the version string: 1.0.0.N20071011 does
not get picked up using that version range. Any ideas?

 

Roshan


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




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




RE: Version ranges

Posted by Dave Hoffer <DH...@xrite.com>.
Just for fun try [0.0,) this means version 0.0 or later.

Also, I don't know how maven treats 1.0.0.N20071001-0010; this isn't a
standard release version.

I don't see anything else.

-Dave

-----Original Message-----
From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com] 
Sent: Tuesday, October 09, 2007 5:50 PM
To: Maven Users List
Subject: RE: Version ranges

I am trying to develop/extend the maven-pst plugin. Basically, this
plugin will read through the eclipse plugins directory and load these
plugins as artifacts in the repository. (This already works)

Then when I create an eclipse plugin project and run a mvn clean package
on it, it uses the a mojo to convert the Manifest file in the project,
using the require bundle property, to populate the POM before loading
the dependencies. Because most of the time the manifest file will not
hold the dependency version information, I want to specify a version
range that will get the latest and greatest release from the repository.
I was using a version range of (0.0,) because not all eclipse plugins
have reached the 1.0 and later stage. However, this does not seem to be
working.

My maven-metadata.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?><metadata>
  <groupId>org.eclipse</groupId>
  <artifactId>org.eclipse.equinox.jmx.client</artifactId>
  <version>1.0.0.N20071001-0010</version>
  <versioning>
    <versions>
      <version>1.0.0.N20071001-0010</version>
    </versions>
    <lastUpdated>20071009213825</lastUpdated>
  </versioning>
</metadata>

Which should mean that if I have this in my pom.xml:

<dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>org.eclipse.equinox.jmx.client</artifactId>
      <version>(0.0,)</version>
    </dependency>

then it should pick it up, but that doesn't work. It only works if I set
the version exactly right:
<dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>org.eclipse.equinox.jmx.client</artifactId>
      <version>1.0.0.N20071001-0010</version>
    </dependency>


Maybe the reason this isn't working is because version ranges do not use
the local repository? Which is where I have installed all my eclipse
plugins. Do I need to specify directly that they are releases in the
maven-metadata.xml?

Roshan

-----Original Message-----
From: Dave Hoffer [mailto:DHoffer@xrite.com]
Sent: Tue 10/9/2007 4:21 PM
To: Maven Users List
Subject: RE: Version ranges
 
Is version 1.0.0.N20071011 a released or snapshot version?  Version
ranges are not supposed to get snapshots unless specifically part of the
version range (but the current code does not handle this properly).

We use version ranges all the time and the general form of [1.0,) will
find any released version 1.0 or greater.  I'm not sure what your
example does because you are excluding version 0.0.

-Dave

-----Original Message-----
From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com] 
Sent: Tuesday, October 09, 2007 1:01 PM
To: users@maven.apache.org
Subject: Version ranges

Looking at the documentation on the site and Codehaus, I could not find
the best way to specify to get the latest release as a version range. I
tried (0.0,) and it did not seem to work properly for all types of
version strings. In particular, the version string: 1.0.0.N20071011 does
not get picked up using that version range. Any ideas?

 

Roshan


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




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


RE: Version ranges

Posted by "Roshan A. Punnoose" <rp...@proteus-technologies.com>.
I am trying to develop/extend the maven-pst plugin. Basically, this plugin will read through the eclipse plugins directory and load these plugins as artifacts in the repository. (This already works)

Then when I create an eclipse plugin project and run a mvn clean package on it, it uses the a mojo to convert the Manifest file in the project, using the require bundle property, to populate the POM before loading the dependencies. Because most of the time the manifest file will not hold the dependency version information, I want to specify a version range that will get the latest and greatest release from the repository. I was using a version range of (0.0,) because not all eclipse plugins have reached the 1.0 and later stage. However, this does not seem to be working.

My maven-metadata.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?><metadata>
  <groupId>org.eclipse</groupId>
  <artifactId>org.eclipse.equinox.jmx.client</artifactId>
  <version>1.0.0.N20071001-0010</version>
  <versioning>
    <versions>
      <version>1.0.0.N20071001-0010</version>
    </versions>
    <lastUpdated>20071009213825</lastUpdated>
  </versioning>
</metadata>

Which should mean that if I have this in my pom.xml:

<dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>org.eclipse.equinox.jmx.client</artifactId>
      <version>(0.0,)</version>
    </dependency>

then it should pick it up, but that doesn't work. It only works if I set the version exactly right:
<dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>org.eclipse.equinox.jmx.client</artifactId>
      <version>1.0.0.N20071001-0010</version>
    </dependency>


Maybe the reason this isn't working is because version ranges do not use the local repository? Which is where I have installed all my eclipse plugins. Do I need to specify directly that they are releases in the maven-metadata.xml?

Roshan

-----Original Message-----
From: Dave Hoffer [mailto:DHoffer@xrite.com]
Sent: Tue 10/9/2007 4:21 PM
To: Maven Users List
Subject: RE: Version ranges
 
Is version 1.0.0.N20071011 a released or snapshot version?  Version
ranges are not supposed to get snapshots unless specifically part of the
version range (but the current code does not handle this properly).

We use version ranges all the time and the general form of [1.0,) will
find any released version 1.0 or greater.  I'm not sure what your
example does because you are excluding version 0.0.

-Dave

-----Original Message-----
From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com] 
Sent: Tuesday, October 09, 2007 1:01 PM
To: users@maven.apache.org
Subject: Version ranges

Looking at the documentation on the site and Codehaus, I could not find
the best way to specify to get the latest release as a version range. I
tried (0.0,) and it did not seem to work properly for all types of
version strings. In particular, the version string: 1.0.0.N20071011 does
not get picked up using that version range. Any ideas?

 

Roshan


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




RE: Version ranges

Posted by Dave Hoffer <DH...@xrite.com>.
Is version 1.0.0.N20071011 a released or snapshot version?  Version
ranges are not supposed to get snapshots unless specifically part of the
version range (but the current code does not handle this properly).

We use version ranges all the time and the general form of [1.0,) will
find any released version 1.0 or greater.  I'm not sure what your
example does because you are excluding version 0.0.

-Dave

-----Original Message-----
From: Roshan A. Punnoose [mailto:rpunnoose@proteus-technologies.com] 
Sent: Tuesday, October 09, 2007 1:01 PM
To: users@maven.apache.org
Subject: Version ranges

Looking at the documentation on the site and Codehaus, I could not find
the best way to specify to get the latest release as a version range. I
tried (0.0,) and it did not seem to work properly for all types of
version strings. In particular, the version string: 1.0.0.N20071011 does
not get picked up using that version range. Any ideas?

 

Roshan


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