我已经通过以下步骤在我的windows 8 64位机器上安装了Maven 3.0.5:
下载了apache-maven-3.05.bin.zip,存档存储在C:\Program Files\apache Software Foundation中。我更改了环境变量如下:M2_HOME,值为C:\Program Files\Apache Software Foundation\Apache-maven-3.0.5值为%M2_HOME%\bin的M2值为C:\Program Files\Java\jdk1.8.0_25的JAVE_HOMEPATH,值为%M2%;%JAVA_HOME%\bin
在这之后,当我键入mvn时——版本我得到
Apache Maven 3.0.5(r01de14724cdef164cd33c7c8c2fe155faf9602da;2013-02-19 19:21:28+0530)Maven home:C:\Program Files\Apache Software Foundation\Apache-Maven-3.0.5Java版本:1.8.0_25,供应商:Oracle CorporationJava主页:C:\Program Files\Java\jdk1.8.0_25\jre默认区域设置:en_US,平台编码:Cp1252操作系统名称:"windows8",版本:"6.2",arch:"amd64",系列:"dos"
我已经在下面的文件夹中下载了JDK和JREC: \Program Files\Java\jdk1.8.0_25C: \Program Files\Java\jre1.8.0_25
现在,为了安装Karma,我下载了Web Karma Master zip,档案放在C: \程序文件\网络因果报应大师\网络因果报应大师
现在,当我在这个目录中键入mvn clean install时,我会得到以下内容:
..
...
...
[INFO] karma-mr .......................................... SKIPPED
[INFO] karma-storm ....................................... SKIPPED
[INFO] karma-web-services ................................ SKIPPED
[INFO] web-services-rdf .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.285s
[INFO] Finished at: Wed Oct 29 13:21:14 IST 2014
[INFO] Final Memory: 8M/109M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.codehaus.mojo:exec-maven-plugin:1.1
or one of its dependencie s could not be resolved: Failed
to read artifact descriptor for org.codehaus.mojo:
exec-maven-plugin:jar:1.1: Could not transfer artifact
org.codehaus.mojo:exec-maven-plugin:pom:1.1 from/to central
Connection to http://repo.maven.apache.org refused:
Connection timed out: connect -> [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.
请帮忙。我已经按照上面提到的相同顺序完成了以上所有操作。但我无法解决这个问题。
Archana。
在HOME
目录的.m2
文件夹中创建一个文件settings.xml
。添加以下内容:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>your.org</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>*.your.org</nonProxyHosts>
</proxy>
</proxies>
</settings>
如果代理服务器不需要身份验证,请删除<username>
和<password>
标记。您可以在浏览器settings
中查找这些值。
另请参阅maven设置参考的代理部分。