You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stephan Zehrer (JIRA)" <ji...@codehaus.org> on 2006/12/17 12:29:40 UTC

[jira] Created: (MNG-2704) Range check don't work correct

Range check don't work correct
------------------------------

                 Key: MNG-2704
                 URL: http://jira.codehaus.org/browse/MNG-2704
             Project: Maven 2
          Issue Type: Bug
          Components: Dependencies
    Affects Versions: 2.0.4
         Environment: OS: Windows XP
Java: jdk1.5.0_10

            Reporter: Stephan Zehrer
            Priority: Minor
         Attachments: demo.zip

I included the following part in my pom.xml:

		<dependency>
			<groupId>org.eclipse.jface</groupId>
			<artifactId>org.eclipse.jface</artifactId>
			<version>3.2.0</version>
		</dependency>	

I always get the following error 

No versions are present in the repository for the artifact with a range [3.2.0,4.0.0)
  org.eclipse.equinox:org.eclipse.equinox.common:jar:null

But I am sure that version 3.2.0 is available in the repository. 
If I define only a dependency on this library like this

		<dependency>
			<groupId>org.eclipse.equinox</groupId>
			<artifactId>org.eclipse.equinox.common</artifactId>
			<version>3.2.0</version>
		</dependency>
it works!

If I define both it will not work. Why?
According 
http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
It could be forced by this

My current workaround is the exclusion definition.

What did I wrong or is this a bug?


See the demo I Attached, you need the Eclipse repository.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2704) Range check don't work correct

Posted by "Stephan Zehrer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2704?page=comments#action_84667 ] 
            
Stephan Zehrer commented on MNG-2704:
-------------------------------------

again and again and again ...
and I did not change something in my configuration (hopefully *g*)

10.01.07 18:15:30 CET: Reading /vse/pom.xml
10.01.07 18:15:30 CET: Local repository folder "" does not exist
10.01.07 18:15:30 CET: No versions are present in the repository for the artifact with a range [3.2.0,4.0.0) org.eclipse.equinox:org.eclipse.equinox.common-null.jar

I read an an article about cleanups in the rep. ... is this maybe a reason??

 

> Range check don't work correct
> ------------------------------
>
>                 Key: MNG-2704
>                 URL: http://jira.codehaus.org/browse/MNG-2704
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: OS: Windows XP
> Java: jdk1.5.0_10
>            Reporter: Stephan Zehrer
>            Priority: Minor
>         Attachments: demo.zip
>
>
> I included the following part in my pom.xml:
> 		<dependency>
> 			<groupId>org.eclipse.jface</groupId>
> 			<artifactId>org.eclipse.jface</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>	
> I always get the following error 
> No versions are present in the repository for the artifact with a range [3.2.0,4.0.0)
>   org.eclipse.equinox:org.eclipse.equinox.common:jar:null
> But I am sure that version 3.2.0 is available in the repository. 
> If I define only a dependency on this library like this
> 		<dependency>
> 			<groupId>org.eclipse.equinox</groupId>
> 			<artifactId>org.eclipse.equinox.common</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>
> it works!
> If I define both it will not work. Why?
> According 
> http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
> It could be forced by this
> My current workaround is the exclusion definition.
> What did I wrong or is this a bug?
> See the demo I Attached, you need the Eclipse repository.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2704) Range check don't work correct

Posted by "Pavel Halas (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88893 ] 

Pavel Halas commented on MNG-2704:
----------------------------------

We got the same problem. Nicely seen when working with eclipse plugin which creates a dependency ranges.
Test case:
- Use eclipse:make-artifacts to place your eclipse 3.2 plugins into a repository.
- Do the same for eclipse 3.3 (M5 for example) plugins.
- Use the {{pom.xml}} like the one below.
- Run {{mvn dependency:resolve}}
- You will get "Missing: 1) org.eclipse.jface:org.eclipse.jface:jar:4.0.0"
{noformat}
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

	<modelVersion>4.0.0</modelVersion>
	<groupId>group</groupId>
	<version>1.0-SNAPSHOT</version>
	<artifactId>Whatever</artifactId>
	<name>Whatever</name>
	<packaging>jar</packaging>

	<dependencies>
			<dependency>
				<groupId>org.eclipse.ui</groupId>
				<artifactId>org.eclipse.ui</artifactId>
				<version>3.2.1</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jface</groupId>
				<artifactId>org.eclipse.jface</artifactId>
				<version>3.2.1</version>
			</dependency>
	</dependencies>
</project>
{noformat}

> Range check don't work correct
> ------------------------------
>
>                 Key: MNG-2704
>                 URL: http://jira.codehaus.org/browse/MNG-2704
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: OS: Windows XP
> Java: jdk1.5.0_10
>            Reporter: Stephan Zehrer
>            Priority: Minor
>         Attachments: demo.zip
>
>
> I included the following part in my pom.xml:
> 		<dependency>
> 			<groupId>org.eclipse.jface</groupId>
> 			<artifactId>org.eclipse.jface</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>	
> I always get the following error 
> No versions are present in the repository for the artifact with a range [3.2.0,4.0.0)
>   org.eclipse.equinox:org.eclipse.equinox.common:jar:null
> But I am sure that version 3.2.0 is available in the repository. 
> If I define only a dependency on this library like this
> 		<dependency>
> 			<groupId>org.eclipse.equinox</groupId>
> 			<artifactId>org.eclipse.equinox.common</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>
> it works!
> If I define both it will not work. Why?
> According 
> http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
> It could be forced by this
> My current workaround is the exclusion definition.
> What did I wrong or is this a bug?
> See the demo I Attached, you need the Eclipse repository.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2704) Range check don't work correct

Posted by "fabrizio giustina (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2704?page=comments#action_82808 ] 
            
fabrizio giustina commented on MNG-2704:
----------------------------------------

for version ranges to work you have to be sure that metadata in the repository are ok.
Your example should work if the remote (or local if you didn't downloaded such dependency) repository contains a metadata like:
http://repo1.maven.org/eclipse/org/eclipse/equinox/org.eclipse.equinox.common/maven-metadata.xml

If you are using version range you need to have good metadata, which usually means never manually copy anything to the local repository.

> Range check don't work correct
> ------------------------------
>
>                 Key: MNG-2704
>                 URL: http://jira.codehaus.org/browse/MNG-2704
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: OS: Windows XP
> Java: jdk1.5.0_10
>            Reporter: Stephan Zehrer
>            Priority: Minor
>         Attachments: demo.zip
>
>
> I included the following part in my pom.xml:
> 		<dependency>
> 			<groupId>org.eclipse.jface</groupId>
> 			<artifactId>org.eclipse.jface</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>	
> I always get the following error 
> No versions are present in the repository for the artifact with a range [3.2.0,4.0.0)
>   org.eclipse.equinox:org.eclipse.equinox.common:jar:null
> But I am sure that version 3.2.0 is available in the repository. 
> If I define only a dependency on this library like this
> 		<dependency>
> 			<groupId>org.eclipse.equinox</groupId>
> 			<artifactId>org.eclipse.equinox.common</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>
> it works!
> If I define both it will not work. Why?
> According 
> http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
> It could be forced by this
> My current workaround is the exclusion definition.
> What did I wrong or is this a bug?
> See the demo I Attached, you need the Eclipse repository.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-2704) Range check don't work correct

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter closed MNG-2704.
-----------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: Reviewed Pending Version Assignment)

> Range check don't work correct
> ------------------------------
>
>                 Key: MNG-2704
>                 URL: http://jira.codehaus.org/browse/MNG-2704
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: OS: Windows XP
> Java: jdk1.5.0_10
>            Reporter: Stephan Zehrer
>            Priority: Minor
>         Attachments: demo.zip
>
>
> I included the following part in my pom.xml:
> 		<dependency>
> 			<groupId>org.eclipse.jface</groupId>
> 			<artifactId>org.eclipse.jface</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>	
> I always get the following error 
> No versions are present in the repository for the artifact with a range [3.2.0,4.0.0)
>   org.eclipse.equinox:org.eclipse.equinox.common:jar:null
> But I am sure that version 3.2.0 is available in the repository. 
> If I define only a dependency on this library like this
> 		<dependency>
> 			<groupId>org.eclipse.equinox</groupId>
> 			<artifactId>org.eclipse.equinox.common</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>
> it works!
> If I define both it will not work. Why?
> According 
> http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
> It could be forced by this
> My current workaround is the exclusion definition.
> What did I wrong or is this a bug?
> See the demo I Attached, you need the Eclipse repository.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2704) Range check don't work correct

Posted by "Stephan Zehrer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2704?page=comments#action_83257 ] 
            
Stephan Zehrer commented on MNG-2704:
-------------------------------------

I don't know why, but today the problem was gone.

Has somebody fixed something?

Even my workaround (see http://www.stephan-zehrer.de/Maven2) did not work anymore and tried the correct solution again, and know it works.

So close this PTR.

> Range check don't work correct
> ------------------------------
>
>                 Key: MNG-2704
>                 URL: http://jira.codehaus.org/browse/MNG-2704
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: OS: Windows XP
> Java: jdk1.5.0_10
>            Reporter: Stephan Zehrer
>            Priority: Minor
>         Attachments: demo.zip
>
>
> I included the following part in my pom.xml:
> 		<dependency>
> 			<groupId>org.eclipse.jface</groupId>
> 			<artifactId>org.eclipse.jface</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>	
> I always get the following error 
> No versions are present in the repository for the artifact with a range [3.2.0,4.0.0)
>   org.eclipse.equinox:org.eclipse.equinox.common:jar:null
> But I am sure that version 3.2.0 is available in the repository. 
> If I define only a dependency on this library like this
> 		<dependency>
> 			<groupId>org.eclipse.equinox</groupId>
> 			<artifactId>org.eclipse.equinox.common</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>
> it works!
> If I define both it will not work. Why?
> According 
> http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
> It could be forced by this
> My current workaround is the exclusion definition.
> What did I wrong or is this a bug?
> See the demo I Attached, you need the Eclipse repository.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2704) Range check don't work correct

Posted by "Stephan Zehrer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2704?page=comments#action_84350 ] 
            
Stephan Zehrer commented on MNG-2704:
-------------------------------------

Today i run into a similar problem ...this time the error text was :

08.01.07 14:35:05 CET: No versions are present in the repository for the artifact with a range [3.2.0,4.0.0) org.eclipse.core:org.eclipse.core.commands-null.jar
08.01.07 14:35:05 CET: No versions are present in the repository for the artifact with a range [3.2.0,4.0.0) org.eclipse.core:org.eclipse.core.commands-null.jar
08.01.07 14:37:35 CET: Reading /vse/pom.xml
08.01.07 14:37:35 CET: Local repository folder "" does not exist
08.01.07 14:37:35 CET: No versions are present in the repository for the artifact with a range [3.2.0,4.0.0) org.eclipse.core:org.eclipse.core.commands-null.jar

After an cleanup of my local repository it worked.
Seems for me the same problem and is related to the local repository state. 

Some ideas?

> Range check don't work correct
> ------------------------------
>
>                 Key: MNG-2704
>                 URL: http://jira.codehaus.org/browse/MNG-2704
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: OS: Windows XP
> Java: jdk1.5.0_10
>            Reporter: Stephan Zehrer
>            Priority: Minor
>         Attachments: demo.zip
>
>
> I included the following part in my pom.xml:
> 		<dependency>
> 			<groupId>org.eclipse.jface</groupId>
> 			<artifactId>org.eclipse.jface</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>	
> I always get the following error 
> No versions are present in the repository for the artifact with a range [3.2.0,4.0.0)
>   org.eclipse.equinox:org.eclipse.equinox.common:jar:null
> But I am sure that version 3.2.0 is available in the repository. 
> If I define only a dependency on this library like this
> 		<dependency>
> 			<groupId>org.eclipse.equinox</groupId>
> 			<artifactId>org.eclipse.equinox.common</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>
> it works!
> If I define both it will not work. Why?
> According 
> http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
> It could be forced by this
> My current workaround is the exclusion definition.
> What did I wrong or is this a bug?
> See the demo I Attached, you need the Eclipse repository.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2704) Range check don't work correct

Posted by "Barrie Treloar (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=129193#action_129193 ] 

Barrie Treloar commented on MNG-2704:
-------------------------------------

Note the version range in org.eclipse.core.runtime/META-INF/MANIFEST.MF for org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)"

{noformat:title=org.eclipse.core.runtime/META-INF/MANIFEST.MF}
Manifest-Version: 1.0
Bundle-Name: %pluginName
Bundle-Activator: org.eclipse.core.internal.runtime.PlatformActivator
Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3
Bundle-Vendor: %providerName
Bundle-ManifestVersion: 2
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.core.runtime; singleton:=true
Require-Bundle: org.eclipse.osgi;bundle-version="[3.2.0,4.0.0)";visibi
 lity:=reexport,org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.
 0)";visibility:=reexport,org.eclipse.core.jobs;bundle-version="[3.2.0
 ,4.0.0)";visibility:=reexport,org.eclipse.equinox.registry;bundle-ver
 sion="[3.2.0,4.0.0)";visibility:=reexport,org.eclipse.equinox.prefere
 nces;bundle-version="[3.2.0,4.0.0)";visibility:=reexport,org.eclipse.
 core.contenttype;bundle-version="[3.2.0,4.0.0)";visibility:=reexport,
 org.eclipse.core.runtime.compatibility.auth;bundle-version="[3.2.0,4.
 0.0)";resolution:=optional
Export-Package: org.eclipse.core.internal.preferences.legacy;x-interna
 l:=true,org.eclipse.core.internal.runtime;x-friends:="org.eclipse.cor
 e.runtime.compatibility",org.eclipse.core.runtime
Bundle-Version: 3.2.0.v20060603
Eclipse-LazyStart: true
{noformat}

{code:xml|title="org.eclipse.core:runtime:3.2.0-v20060603 pom.xml"}
<?xml version="1.0" encoding="UTF-8"?><project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.eclipse.core</groupId>
  <artifactId>runtime</artifactId>
  <name>Core Runtime</name>
  <version>3.2.0-v20060603</version>
  <licenses>
    <license>
      <name>Eclipse Public License - v 1.0</name>
      <url>http://www.eclipse.org/org/documents/epl-v10.html</url>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>osgi</artifactId>
      <version>[3.2.0,4.0.0)</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.equinox</groupId>
      <artifactId>common</artifactId>
      <version>[3.2.0,4.0.0)</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.core</groupId>
      <artifactId>jobs</artifactId>
      <version>[3.2.0,4.0.0)</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.equinox</groupId>
      <artifactId>registry</artifactId>
      <version>[3.2.0,4.0.0)</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.equinox</groupId>
      <artifactId>preferences</artifactId>
      <version>[3.2.0,4.0.0)</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.core</groupId>
      <artifactId>contenttype</artifactId>
      <version>[3.2.0,4.0.0)</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.core.runtime.compatibility</groupId>
      <artifactId>auth</artifactId>
      <version>[3.2.0,4.0.0)</version>
      <optional>true</optional>
    </dependency>
  </dependencies>
</project>
{code}

Now when you use maven-eclipse-plugin:to-maven:2.5 to seed you local internal repository it will by default use the qualifiers.

I am using Eclipse 3.2.2 so this is the jar in the plugins directory: org.eclipse.equinox.common_3.2.0.v20060603.jar

which gets installed into the internal repository as:
{code:xml}
      <dependency>
        <groupId>org.eclipse.equinox</groupId>
        <artifactId>common</artifactId>
        <version>3.2.0-v20060603</version>
        <scope>provided</scope>
      </dependency>
{code}

As per http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution

[3.2.0,4.0.0) is compared against 3.2.0-v20060603

See the point "if qualifier does not exist, it is newer than if it does"
As 3.2.0 does not have a qualified it must be newer than 3.2.0-v20060603 and therefore Maven fails to resolve
the artifact.

> Range check don't work correct
> ------------------------------
>
>                 Key: MNG-2704
>                 URL: http://jira.codehaus.org/browse/MNG-2704
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: OS: Windows XP
> Java: jdk1.5.0_10
>            Reporter: Stephan Zehrer
>            Priority: Minor
>             Fix For: Reviewed Pending Version Assignment
>
>         Attachments: demo.zip
>
>
> I included the following part in my pom.xml:
> 		<dependency>
> 			<groupId>org.eclipse.jface</groupId>
> 			<artifactId>org.eclipse.jface</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>	
> I always get the following error 
> No versions are present in the repository for the artifact with a range [3.2.0,4.0.0)
>   org.eclipse.equinox:org.eclipse.equinox.common:jar:null
> But I am sure that version 3.2.0 is available in the repository. 
> If I define only a dependency on this library like this
> 		<dependency>
> 			<groupId>org.eclipse.equinox</groupId>
> 			<artifactId>org.eclipse.equinox.common</artifactId>
> 			<version>3.2.0</version>
> 		</dependency>
> it works!
> If I define both it will not work. Why?
> According 
> http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
> It could be forced by this
> My current workaround is the exclusion definition.
> What did I wrong or is this a bug?
> See the demo I Attached, you need the Eclipse repository.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira