2
votes

I'm using apache-maven-3.0.5 and I'm getting the following error:

Error resolving version for plugin 'org.mortbay.jetty:jetty-maven-plugin' from the repositories [local (C:\Documents and Settings\lamiranda.m2\repository), vaadin-snapshots (http://oss.sonatype.org/content/repositories/vaadin-snapshots/), central (http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository

When I do "Run As Maven clean" or "Run As Maven install" the following error occurs:

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.royale:Restaurant:war:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.eclipse.jetty:jetty-maven-plugin is missing. @ line 209, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 155, column 12
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Restaurant Web Application 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/maven-metadata.xml
Downloading: http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/org/eclipse/jetty/jetty-maven-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.eclipse.jetty:jetty-maven-plugin/maven-metadata.xml from/to vaadin-snapshots (http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/): Connection to http://repo.maven.apache.org refused
[WARNING] Could not transfer metadata org.eclipse.jetty:jetty-maven-plugin/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43.312s
[INFO] Finished at: Thu Feb 27 17:47:21 CST 2014
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Error resolving version for plugin 'org.eclipse.jetty:jetty-maven-plugin' from the repositories [local (C:\Documents and Settings\lamiranda\.m2\repository), vaadin-snapshots (http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/), central (http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginVersionResolutionException

Can you help me?

2
Are you running behind firewall or proxy?limc
When you run maven command, add -X to output more verbose message. It may help you.Hong

2 Answers

0
votes

add following snippet in your pom.xml

<project ...>
<repositories>
    <repository>
      <id>maven repo</id>
      <url>http://repo1.maven.org/maven2/</url>
    </repository>
 </repositories>
</project>

Note: <project> tag is just there to represent relative position of <repositories>

check the version it is attempting to download if it doesn't exist on the repositories it is knocking to, then check your network settings

0
votes

Looks like a network connection failure. The plugin URL : http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/ is available. Check you are on line at the moment of the build or configure your proxy if any.