Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven in 5 min not working

Tags:

I have downloaded latest

maven 3.0.3, java version "1.6.0_18".

mvn –version

Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)     Maven home: C:\software\apache-maven-3.0.3     Java version: 1.5.0_05, vendor: Sun Microsystems Inc.     Java home: C:\software\jdk1.5.0.15\jre     Default locale: en_GB, platform encoding: Cp1252     OS name: "windows xp", version: "5.1", arch: "x86", family: "windows" 

My application located at: C:\Temp\ecm_esv\app\ENT_APP\ESV>. I am getting following error message:

C:\Temp\ecm_esv\app\ENT_APP\ESV>mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false [INFO] Scanning for projects... Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.3.1: Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1 Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.5/maven-deploy-plugin-2.5.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.5: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.5 Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0.1/maven-site-plugin-2.0.1.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:2.0.1: Plugin org.apache.maven.plugins:maven-site-plugin:2.0.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:2.0.1 Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3 Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5 Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.1: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.1 Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.0/maven-release-plugin-2.0.pom [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.0: Plugin org.apache.maven.plugins:maven-release-plugin:2.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.0 Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml [WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org [WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml [WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org [WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.406s [INFO] Finished at: Mon Apr 18 15:51:05 CEST 2011 [INFO] Final Memory: 1M/3M [INFO] ------------------------------------------------------------------------ [ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Temp\ecm_esv\app\ENT_APP\ESV), central (http://repo1.maven.org/maven2)] -> [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/NoPluginFoundForPrefixException C:\Temp\ecm_esv\app\ENT_APP\ESV> 

C:\software\apache-maven-3.0.3\conf\settings.xml I have enabled proxies here as:

….   <proxies>     <!-- proxy      | Specification for one proxy, to be used in connecting to the network.      |-->     <proxy>       <id>optional</id>       <active>true</active>       <protocol>http</protocol>             <host>www.BT.co.uk</host>       <port>80</port>       <nonProxyHosts>localhost|google.com</nonProxyHosts>     </proxy>    </proxies> 

What is the problem I am facing here? Why it is not downloading?

like image 604
AKB Avatar asked Apr 18 '11 14:04

AKB


People also ask

How do I run a Maven build?

Running a Maven build via the command line To build a Maven project via the command line, you use the mvn command from the command line. The command must be executed in the directory which contains the relevant pom file. You pass the build life cycle, phase or goal as parameter to this command.

How do I run pom xml?

For this right-click the pom. xml file and select Run As Maven build. This opens a dialog which allows to define the parameters for the start. Enter clean verify in the Goals: field and press the Run button.


1 Answers

Found solution:

Solution #1:

issue was with proxy in settings.xml file:

<host>webproxy</host> 

to get host goto IE->tools->connection->LAN settings->advanced->http.

=====

Solution #2:

if auto configured proxy is given: then

1> open IE(or any browser)

2> get the url address from your browser through IE->Tools->internet option->connections->LAN Settings-> get address and give in url eg: as http://autocache.abc.com/ and enter, a file will be downloaded with .pac format, save to desktop

3> open .pac file in textpad, identify PROXY:

In your editor, it will come something like:

   return "PROXY web-proxy.ind.abc.com:8080; PROXY proxy.sgp.abc.com:8080";  

4> go to Maven settings.xml and enter as:

<proxy>       <id>optional</id>       <active>true</active>       <protocol>http</protocol>                 <host>web-proxy.ind.abc.com</host>       <port>8080</port>           </proxy> 

5> run mvn:install through command prompt or run through eclipse.

=====

Solution #3:

For any other issues delete maven local repository and run mvn:install again.

like image 197
AKB Avatar answered Jan 09 '23 16:01

AKB