eclipse maven错误 - 存储库中没有带有范围的工件的版本

时间:2011-01-05 11:17:22

标签: eclipse maven-2 m2eclipse

我正在尝试对一个项目进行mavenise,它会让我错误地说插件无法解析。我能够从命令行运行mvn install,它运行正常。从eclipse(Helios)调用mvn install时,它给出了下面给出的错误。我验证了罐子存在于我的本地存储库(c:\ users ... m2 \ repository)

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to construct build plan for: Unnamed - myapp:myapp-ecom:war:1.0
Id: myapp:myapp-ecom:war:1.0
task-segment: [install]. Reason: Failed to resolve plugin for mojo binding: org.codehaus.mojo:weblogic-maven-plugin:2.9.1:listapps
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getLifecycleBindings(DefaultLifecycleExecutor.java:414)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:235)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
at org.eclipse.iam.core.embedder.internal.EclipseMaven.executeRequest(EclipseMaven.java:325)
at org.eclipse.iam.core.embedder.internal.EclipseMavenRequest.run(EclipseMavenRequest.java:160)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.apache.maven.lifecycle.plan.LifecyclePlannerException: Failed to resolve plugin for mojo binding: org.codehaus.mojo:weblogic-maven-plugin:2.9.1:listapps
at org.apache.maven.lifecycle.plan.DefaultBuildPlanner.loadPluginDescriptor(DefaultBuildPlanner.java:345)
at org.apache.maven.lifecycle.plan.DefaultBuildPlanner.findForkModifiers(DefaultBuildPlanner.java:192)
at org.apache.maven.lifecycle.plan.DefaultBuildPlanner.addForkedLifecycleModifiers(DefaultBuildPlanner.java:179)
at org.apache.maven.lifecycle.plan.DefaultBuildPlanner.constructBuildPlan_aroundBody0(DefaultBuildPlanner.java:117)
at org.apache.maven.lifecycle.plan.DefaultBuildPlanner.constructBuildPlan_aroundBody1$advice(DefaultBuildPlanner.java:403)
at org.apache.maven.lifecycle.plan.DefaultBuildPlanner.constructBuildPlan(DefaultBuildPlanner.java:1)
at org.eclipse.iam.core.embedder.internal.EclipseMavenBuildPlanner.constructBuildPlan(EclipseMavenBuildPlanner.java:43)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getLifecycleBindings(DefaultLifecycleExecutor.java:400)
... 12 more
Caused by: org.apache.maven.plugin.loader.PluginLoaderException: Failed to load plugin. Reason: No versions are present in the repository for the artifact with a range [9.0,11.0)
weblogic:weblogic:jar:null

from the specified remote repositories:
codehaus.org (http://repository.codehaus.org),
snapshots (http://snapshots.repository.codehaus.org),
central (http://central)
Path to dependency:
1) org.codehaus.mojo:weblogic-maven-plugin:maven-plugin:2.9.1


at org.apache.maven.plugin.loader.DefaultPluginLoader.loadPlugin(DefaultPluginLoader.java:89)
at org.apache.maven.plugin.loader.DefaultPluginLoader.loadPlugin(DefaultPluginLoader.java:52)
at org.apache.maven.lifecycle.plan.DefaultBuildPlanner.loadPluginDescriptor(DefaultBuildPlanner.java:322)
... 19 more
Caused by: org.apache.maven.artifact.versioning.OverConstrainedVersionException: No versions are present in the repository for the artifact with a range [9.0,11.0)
weblogic:weblogic:jar:null

from the specified remote repositories:
codehaus.org (http://repository.codehaus.org),
snapshots (http://snapshots.repository.codehaus.org),
central (http://central)
Path to dependency:
1) org.codehaus.mojo:weblogic-maven-plugin:maven-plugin:2.9.1


at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:496)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:138)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:423)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:394)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:337)
at org.apache.maven.plugin.DefaultPluginManager.getPluginArtifacts(DefaultPluginManager.java:436)
at org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:279)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:211)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:186)
at org.apache.maven.plugin.loader.DefaultPluginLoader.loadPlugin(DefaultPluginLoader.java:79)
... 21 more

3 个答案:

答案 0 :(得分:1)

Eclipse>>窗口>偏好> Maven>设备

答案 1 :(得分:0)

也许你正在点击this issue或类似的。看起来您的pom具有weblogic-maven-plugin依赖项的版本范围。您可以尝试更改它,看看是否有帮助。

答案 2 :(得分:0)

我想你使用m2eclipse插件。这使用嵌入式maven 3版本(请参阅首选项 - > Maven - >安装),这可能与从命令行运行maven的版本不同。

你应该在这里添加你的外部maven安装,并使用它来在eclipse中获得与在命令行中相同的结果。

我不确切知道maven 2和3之间的变化,但是在指定版本范围时听说过对SNAPSHOT版本的不同处理。