问题描述
- 求解 啊 java maven项目
-
[INFO] Scanning for projects...
[INFO] Downloading: http://localhost/nexus-2.7.0-06/content/groups/public/org/codehaus/mojo/tomcat-maven-plugin/1.1/tomcat-maven-plugin-1.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:tomcat-maven-plugin:1.1: Plugin org.codehaus.mojo:tomcat-maven-plugin:1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:tomcat-maven-plugin:jar:1.1
[INFO] Downloading: http://localhost/nexus-2.7.0-06/content/groups/public/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.3.2: Plugin org.apache.maven.plugins:maven-release-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.3.2
[INFO] Downloading: http://localhost/nexus-2.7.0-06/content/groups/public/org/codehaus/mojo/maven-metadata.xml
[INFO] Downloading: http://localhost/nexus-2.7.0-06/content/groups/public/org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to nexus (http://localhost/nexus-2.7.0-06/content/groups/public/): Connection to http://localhost refused
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to nexus (http://localhost/nexus-2.7.0-06/content/groups/public/): Connection to http://localhost refused
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from http://localhost/nexus-2.7.0-06/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to nexus (http://localhost/nexus-2.7.0-06/content/groups/public/): Connection to http://localhost refused
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from http://localhost/nexus-2.7.0-06/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to nexus (http://localhost/nexus-2.7.0-06/content/groups/public/): Connection to http://localhost refused
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.590s
[INFO] Finished at: Wed Jul 29 22:26:26 CST 2015
[INFO] Final Memory: 9M/154M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'tomcat' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (E:apache-maven-3.1.1
epository), nexus (http://localhost/nexus-2.7.0-06/content/groups/public/)] -> [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/NoPluginFoundForPrefixException
解决方案
把这个加到pom.xml中去
apache.snapshots
Apache Snapshots
http://repository.apache.org/content/groups/snapshots-group/
false
true
解决方案二:
apache.snapshots
Apache Snapshots
http://repository.apache.org/content/groups/snapshots-group/
false
true
解决方案三:
<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<name>Apache Snapshots</name>
<url>http://repository.apache.org/content/groups/snapshots-group/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
解决方案四:
maven管理java项目
时间: 2024-10-21 18:16:30