我正在尝试使用maven打包我的项目。我看了很多问题,但没有人可以帮助我,而且,我对此非常新手。当我尝试在项目目录中执行命令“mvn clean package”时,出现以下错误:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.cognitionis:tipsem:jar:2.5
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 48, column 21
[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 TIPSem 2.5
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.653s
[INFO] Finished at: Sat Jun 11 00:29:54 IST 2016
[INFO] Final Memory: 7M/102M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused: Connection refused -> [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/PluginResolutionException
我已经安装了maven版本3.0.5,我也在pom.xml中包含了这个版本号。你能帮我解决这个问题。
答案 0 :(得分:0)
如果您在任何通常限制访问互联网中的网站/存储库的组织中工作,如果您的网站/存储库有任何类型的安全政策,
我建议您与其他人核实您的组织是否已安装任何内部连接或其他maven存储库,如果需要,您需要在.m2 / settings.xml中配置存储库。
如果不是因为@Kevin Hooke告诉检查是否有任何内部防火墙或代理设置。