【问题标题】:problems in installing Karma integration tool for windows 8 64 bit machine为 windows 8 64 位机器安装 Karma 集成工具的问题
【发布时间】:2014-10-30 04:02:47
【问题描述】:

我已经通过以下步骤在我的 windows 8 64 位机器上安装了 Maven 3.0.5:

已下载 apache-maven-3.0.5.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_HOME PATH 值为 %M2%;%JAVA_HOME%\bin

之后当我输入 mvn --version 我得到

Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 19:21: 28+0530) Maven 主页:C:\Program Files\Apache Software Foundation\apache-maven-3.0.5 Java 版本:1.8.0_25,供应商:甲骨文公司 Java 主页:C:\Program Files\Java\jdk1.8.0_25\jre 默认语言环境:en_US,平台编码:Cp1252 操作系统名称:“windows 8”,版本:“6.2”,arch:“amd64”,家族:“dos”

我已经在下面的文件夹中下载了JDK和JRE C:\Program Files\Java\jdk1.8.0_25 C:\Program Files\Java\jre1.8.0_25

现在安装 Karma 我下载了 Web-Karma-Master zip,存档位于 C:\Program Files\Web-Karma-master\Web-Karma-master

现在,当我在此目录中键入 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.

请帮忙。我按照上述相同的顺序完成了上述所有操作。但我无法解决这个问题。

阿卡那。

【问题讨论】:

  • 您在代理服务器后面吗?如果是这样,您需要在您的settings.xml 中配置proxy 设置。
  • 是的,我在代理服务器后面。我需要在settings.xml中配置什么??
  • 添加了详细的答案...

标签: java maven karma-runner


【解决方案1】:

在您的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>

如果您的代理服务器不需要身份验证,请删除 &lt;username&gt;&lt;password&gt; 标记。 您可以在浏览器中查找这些值 settings

另请参阅maven settings referenceproxies 部分。

【讨论】:

  • m2文件夹是文件夹C:\program files\apache software foundation\apache-maven-3.0.5\conf文件夹,原来的settings.xml文件放在这里。对吗?
  • 没有。它是C:\Users\archana 中的一个子文件夹(假设您的Windows 用户名是archana)。
  • 我已经在 m2 文件夹的设置文件 xml 中更改了所需的设置。我已经根据文件中的代理设置提供了主机、用户名、密码和端口 (80)。现在,当我在命令提示符下的 Web-Karma-Master 目录中键入 mvn clean install 时,我仍然会遇到上述相同的错误。现在有什么问题?
  • m2.m2?它已经创建了吗?它有repository 子文件夹吗?
  • 是的,该文件夹已经创建并且它有一个存储库子文件夹。它是 .m2 文件夹
猜你喜欢
  • 2010-12-07
  • 2013-01-27
  • 1970-01-01
  • 2016-10-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多