1
votes

I have installed Maven 3.0.5 on my windows 8 64 bit machine by the following steps:

Downloaded apache-maven-3.0.5.bin.zip and the archive is stored in C:\Program Files\Apache Software Foundation. I changed the environment variables as follows: M2_HOME with value C:\Program Files\Apache Software Foundation\apache-maven-3.0.5 M2 with value %M2_HOME%\bin JAVE_HOME with value C:\Program Files\Java\jdk1.8.0_25 PATH with value %M2%;%JAVA_HOME%\bin

after this when i type mvn --version i get

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.5 Java version: 1.8.0_25, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.8.0_25\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 8", version: "6.2", arch: "amd64", family: "dos"

I have downloaded JDK and JRE in the folders under C:\Program Files\Java\jdk1.8.0_25 C:\Program Files\Java\jre1.8.0_25

Now for Karma to install I downloaded the Web-Karma-Master zip and the archive is placed under C:\Program Files\Web-Karma-master\Web-Karma-master

Now when I type mvn clean install in this directory I get the following:

 ..
...
...
[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.

Please help. I have done all the above in the same order as mentioned. But I am not able to resolve this problem.

Archana.

1
Are you behind a proxy server? If so, you need to configure proxy settings in your settings.xml.Raghuram
yes i am behind a proxy server. What do I need to configure in settings.xml??Archana
Added an answer with the details...Raghuram

1 Answers

0
votes

Create a file settings.xml in .m2 folder of your HOME directory. Add the following:

<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>

Remove <username> and <password> tags if your proxy server does not need authentication. You can look for the values for these in your browser settings.

Also refer to proxies section of maven settings reference.