2014-04-11

I am a newbie to both Linux and Maven. I am trying to get maven working so I can install Mahout. I am having more than just one problem with the process but I will focus on the most basic one:

I am trying to follow this guide
to learn how to get started with maven. when I run the following command in the terminal

I get the following error:

dave@CodeKingdom:~/workspace/maven_test$ mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
[INFO] Scanning for projects...
[WARNING] The metadata /home/dave/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata-central.xml is invalid: end tag name /HEAD must be the same as start tag META from line 1 (position: START_TAG seen ...e/maven/plugins/maven-archetype-plugin/maven-metadata.xml">/HEAD
... @1:385)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.446s
[INFO] Finished at: Thu Apr 10 17:43:57 PDT 2014
[INFO] Final Memory: 8M/310M
[INFO] ------------------------------------------------------------------------
[ERROR] Error resolving version for plugin 'org.apache.maven.plugins:maven-archetype-plugin' from the repositories [local (/home/dave/.m2/repository), central (http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [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/PluginVersionResolutionException

I can't make much sense of the resources out there. What I gather based on my googling is that maven is unable to connect to internet to download the necessary artifacts. But I am not sure whether I should modify setting.xml or pom.xml to fix this or whether I should do something completely different. Plus I can't seem to find a pom.xml file in my maven folder. There is a settings.xml file but I am not clear on how or if I should modify it.
Any help is appreciated.

ps. I apologize for the block format. I couldn't figure out how to properly format it so the lines start from the right place.

Show more