Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Error No POM in this Project when performing archetype:generate

Tags:

java

maven

akka

I am trying my hands on the Akka Pi java tutorials

I am trying to creaate a maven project as stated in the tutorial

but any time I enter the command to create a maven project I get an error. Below are the command and the Error.

C:\Program Files\akka-2.0.2>mvn archetype:generate \


C:\Program Files\akka-2.0.2>mvn archetype:generate \
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.206s
[INFO] Finished at: Wed Sep 26 02:50:38 BST 2012
[INFO] Final Memory: 11M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM
 in this directory (C:\Program Files\akka-2.0.2). Please verify you invoked Mave
n from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProject
Exception

looks like maven is requesting for the POM file but it is not stated in the tutrials that I have to create a POM before generating the project. I am actually new too maven so pardon me. I am using maven version :3.0.4 and akka version 2.0.2 but the tutorial uses akka version 2.0.1 but i donn't think that is the problem any suggestion please.

thank you

like image 813
faisal abdulai Avatar asked Sep 26 '12 02:09

faisal abdulai


2 Answers

remove the \ then it should start to query for more informations.

I have no windows here, but on linux it shows the same behavior with

mvn archetype:generate /

HTH R

like image 74
romedius Avatar answered Nov 09 '22 19:11

romedius


When some tutorials describes a mvn command to be executed that is covered in two rows or more, they might add an extra backslash at the new line (of the instruction) to indicate that the same command continues on next line.

This backslash should be removed BEFORE executing the command. For instance the command for setting up a Jersey Web Application might look like this:

mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes \
-DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.2

but should be launched as below, without backslash:

mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes -DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.2

If NOT removing this extra backslash you might get the error you described above.

like image 35
Daniel Nelson Avatar answered Nov 09 '22 21:11

Daniel Nelson