Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.6, 2.0.7, 2.0.8, 2.0.9
-
None
-
Linux FC6/ jdk 1.6.0
Description
My pom includes the following dependency:
<dependency> <groupId>it.unimaticaspa.unique</groupId> <artifactId>unilet-core</artifactId> <version>[5.0.9.0,5.0.10.0)</version> <type>jar</type> </dependency>
When i try to build the project i get the following stacktrace:
[INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Unable to parse version '[5.0.9.0,5.0.10.0)' for dependency 'it.unimaticaspa.unique:unilet-core:jar': Range defies version ordering: [5.0.9.0,5.0.10.0) [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Unable to parse version '[5.0.9.0,5.0.10.0)' for dependency 'it.unimaticaspa.unique:unilet-core:jar': Range defies version ordering: [5.0.9.0,5.0.10.0) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:552) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:272) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.project.artifact.InvalidDependencyVersionException: Unable to parse version '[5.0.9.0,5.0.10.0)' for dependency 'it.unimaticaspa.unique:unilet-core:jar': Range defies version ordering: [5.0.9.0,5.0.10.0) at org.apache.maven.project.artifact.MavenMetadataSource.createArtifacts(MavenMetadataSource.java:331) at org.apache.maven.project.MavenProject.createArtifacts(MavenProject.java:1558) at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1236) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:397) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) ... 16 more Caused by: org.apache.maven.artifact.versioning.InvalidVersionSpecificationException: Range defies version ordering: [5.0.9.0,5.0.10.0) at org.apache.maven.artifact.versioning.VersionRange.parseRestriction(VersionRange.java:210) at org.apache.maven.artifact.versioning.VersionRange.createFromVersionSpec(VersionRange.java:125) at org.apache.maven.project.artifact.MavenMetadataSource.createArtifacts(MavenMetadataSource.java:327) ... 20 more
It seems that versions are compared as strings, because the problem only comes out comparing versions with different numbers of digits (such as 5.0.9.0 and 5.0.10.0). While comparing 5.0.8.0 with 5.0.9.0 everything is fine.
Attachments
Issue Links
- is duplicated by
-
MNG-2210 Dependency version range picks version 1.7.2-rc1 when specified as [1.8.0.1,)
- Closed
-
MNG-4899 strange behavior during the dependency resolution
- Closed
-
MNG-3518 Handle date qualifier in DefaultArtifactVersion
- Closed
-
MNG-5066 Unable to customize Dependencies version ordering while using range in dependency version tag
- Closed
- is related to
-
MNG-5568 ComparableVersion's breaks contract for Comparable, in some edgecases the comparisons are not transitive
- Closed
- relates to
-
MNG-2742 Using a version range in a plugin dependency causes "failure to resolve artifact" error
- Closed
-
MNG-3526 Small change to artifact version parsing.
- Closed
- Wiki Page
-
Wiki Page Loading...