You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Barrie Treloar (JIRA)" <ji...@codehaus.org> on 2008/03/31 07:10:58 UTC
[jira] Commented: (MNG-2704) Range check don't work correct
[ 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