我是Maven的新手,我正在尝试使用Maven 3.3构建一个项目但是我在命令提示符下使用命令mvn clean install exec:java遇到了以下错误。
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to mirrorId (https://oss.sonatype.org/content/repositories): http://http=server.proxyserver.com
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.132 s
[INFO] Finished at: 2016-09-22T18:59:14+05:30
[INFO] Final Memory: 8M/113M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'exec' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\xxx\.m2\repository), mirrorId (https://oss.sonatype.org/content/repositories)] -> [Help 1]
我在POM.xml中更改了代理设置,而我的POM是
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<includeProjectDependencies>false</includeProjectDependencies>
<includePluginDependencies>true</includePluginDependencies>
<executableDependency>
<groupId>org.kaaproject.kaa.demo.zeppelin</groupId>
<artifactId>simulator</artifactId>
</executableDependency>
<mainClass>org.kaaproject.kaa.demo.zeppelin.Simulator</mainClass>
</configuration>
<dependencies>
<dependency>
<groupId>org.kaaproject.kaa.demo.zeppelin</groupId>
<artifactId>simulator</artifactId>
<version>1.2.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
</dependencies>
</plugin>
我的settings.xml是,
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>http://http=xxx.proxyserver.com</host>
<port>8080</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
非常感谢..期待听到......即使最后发布的帖子也无济于事。
答案 0 :(得分:0)
我认为问题在于您的代理配置。请查看this (https://maven.apache.org/settings.html#Proxies)或this (https://maven.apache.org/guides/mini/guide-proxies.html)。
<host>
应该是没有协议的主机名(已由<protocol>
提供。我认为“http://http=
...”是一个错字?或者你是什么意思使用=
?
你写过“我是Maven的新手”,你真的想要使用代理吗?如果是这样,您必须正确配置它。如果不只是从您<proxies>
settings.xml
元素