[ http://jira.codehaus.org/browse/MNG-2742?page=comments#action_84683 ]
Matthew Adams commented on MNG-2742:
------------------------------------
I just noticed that the same problem exists when building my Maven2 plugin as
well if I declare a dependency on a version range:
In my plugin's pom.xml:
...
<dependencies>
<dependency>
<groupId>com.xcalia</groupId>
<artifactId>xic</artifactId>
<version>[4.3.1-1231,)</version>
</dependency>
...
Here is the log, starting with the error:
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
No versions are present in the repository for the artifact with a range
[4.3.1-1231,)
com.xcalia:xic:jar:null
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: No versions are present
in the repository for the artifact with a range [4.3.1-1231,)
com.xcalia:xic:jar:null
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:551)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
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:585)
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.artifact.versioning.OverConstrainedVersionException: No
versions are present in the repository for the artifact with a range [
1231,)
com.xcalia:xic:jar:null
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
at
org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:253)
at
org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:67)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:223)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:211)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:182)
at
org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1117)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:366)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
> Using a version range in a plugin dependency causes "failure to resolve
> artifact" error
> ---------------------------------------------------------------------------------------
>
> Key: MNG-2742
> URL: http://jira.codehaus.org/browse/MNG-2742
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 2.0.4
> Environment: Windows XP SP2, java version "1.5.0_08"
> Reporter: Matthew Adams
> Attachments: mvn.txt, pom.xml
>
>
> If I declare a dependency in a plugin using an exact version, Maven correctly
> resolves the artifact. If, however, I change the dependency's version to a
> version range, Maven no longer resolves the artifact. I'm using the very
> same artifact and version range in my project's dependencies and everything
> works ok. See my attached pom.xml file for details, in particular, the
> comments "<!-- Using version range here ok -->" and "<!-- Can't use version
> range here! -->".
> I am using the "major.minor.revision-buildNumber" version string syntax as
> described on the wiki.
--
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