相关文章
更多最近更新
更多maven简单命令无法执行,提示无法下载插件
2019-03-25 13:35|来源: 网路
D:\Work\testartifct>mvn clean
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mymaven 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.663s
[INFO] Finished at: Thu Jul 05 22:50:42 CST 2012
[INFO] Final Memory: 2M/60M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its d
ependencies could not be resolved: Failed to read artifact descriptor for org.ap
ache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact org
.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo.
maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused: Co
nnection timed out: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
问题补充:本机可以直接上网,另外本机使用MAVEN2.2.1 和 3.0.4 都是这个情况。
问题补充:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
http://repo1.maven.apache.org/maven2/org/apache/maven/plugins/maven-
clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
http://repo2.maven.apache.org/maven2/org/apache/maven/plugins/maven-
clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
这几个中心仓库地址都无法访问。在公司网络可以访问到以上地址,看样子要设置代理。
现在设置的代理服务器不能连接
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its d
ependencies could not be resolved: Failed to read artifact descriptor for org.ap
ache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact org
.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo.
maven.apache.org/maven2): Connection to http://proxy.somewhere.com:8080 refused:
Connection timed out: connect -> [Help 1]
还有别的代理服务器吗???
问题补充:问题成功解决:
设置成正常代理可以。具体方法可以下载一个代理工具。只要IE配置成能直接访问http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 表示能正常下载了。
配置
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>127.0.0.1</host>
<port>8282</port>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>
关键的
<host>127.0.0.1</host>
<port>8282</port>
只要与你的ie代理客户端 配置一致就可以。
相关问答
更多-
最新开通快手实验室教程 直播权限?[2022-02-22]
简单 -
自从Maven依赖插件 2.1版本以来,有一个依赖关系:为此目的获得目标。 为确保使用正确版本的插件,您需要使用“完全限定名称”: mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:get \ -DrepoUrl=http://download.java.net/maven/2/ \ -Dartifact=robo-guice:robo-guice:0.4-SNAPSHOT Since version 2.1 of the M ...
-
当您在父级POM级别运行命令时,您告诉Maven 为每个模块调用生命周期的这一部分。 如果您只想为子模块调用exec:exec,则应该只声明子模块的插件(因为它对继承父模块的其他模块没有意义),并使用--projects或-pl参数调用Maven : mvn -pl子包程序集:程序集exec:exec 此命令从父项目执行时,将执行package assembly:assembly exec:exec仅用于子项目。 但是,如果您真正想要完成的是可以package所有模块package到一个命令中, 并且您希望 ...
-
当Maven试图清理某个子文件夹中的某个文件时,我看到了这种错误。 检查你的Tomcat实例是否真的停止了(在任务管理器中查找不应该在那里的java进程)。 我也为自己创建了这个问题,方法是在文本编辑器中打开访问日志,然后忘记在关闭Tomcat并尝试运行新版本后关闭编辑器。 I've seen this sort of error whenever there's a process that's holding a lock on a file in some subfolder that Maven i ...
-
由于maven插件,无法从命令提示符创建Maven项目(Not able to create Maven project from command prompt because of maven plugins)[2022-08-30]
你是否支持代理公司网络? 如果是这样,尝试将代理详细信息添加到settings.xml,您应该在.m2目录或MAVEN_HOME / conf /目录中找到/创建此文件proxy-http true http your proxy url 80 userid ... -
您可以在prepare-package阶段运行copy-jar-for-exe 。 我相信你可以在同一个插件配置中定义两个执行,但是在launch4j插件之后声明插件。 基本思想是,同一阶段执行的插件按照pom中出现的顺序执行。 如果将单个执行绑定到另一个(较早)阶段,则应该先执行它。 我没有测试过这个,但我认为它应该可以工作
com.akathist.maven.plugins.launch4j launch ... -
Maven在META-INF / plexus / components.xml中定义了3个生命周期: 1.默认生命周期 默认的生命周期没有任何关联的插件。 META-INF / plexus / default-bindings.xml中的每个包装单独定义这些生命周期的插件绑定 例如jar包装的插件绑定
org.apache.maven.plugins:maven-resources-plugin:2.6:resources maven插件执行(maven plugin execution)[2022-06-04]
这取决于插件。 如果插件作者在mojo元数据中指定了@phase ,它将在那里结束。 如果没有,它根本不会运行。 It depends on the plugin. If the plugin author specified an @phase in the mojo metadata, it will end up there. If not, it won't run at all.正如@Gab所提到的,使用Maven配置文件是一种方式。 创建一个配置文件并在配置文件中配置您的插件。 然后在配置文件的activation部分中,引用具有或不具有值的环境变量:debug 根据你的错误,我可以看到 错误= 13,权限被拒绝 尝试使用ant plugin chmod任务授予buildPython.sh权限,以查看它是否解决了问题。 见下文,org.apache.maven.plugins maven-antrun-plugin