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

3

7

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

Incarnate answered 26/9, 2012 at 2:8 Comment(4)
You need to specify which archetype (a kind of project-level template) to use. Does the tutorial mention which archetype you need?Magner
I think the archetype is quickstartIncarnate
have a look at this as part of the tutorials commands : C:\Users\jboner\src\akka\akka-2.0.1> mvn archetype:generate \ -DgroupId=akka.tutorial.first.java \ -DartifactId=akka-tutorial-first-java \ -DarchetypeArtifactId=maven-archetype-quickstart \ -DinteractiveMode=falseIncarnate
Go with @romedius answer. At a minimum the extra information you get will be helpful.Magner
H
9

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

Harbin answered 26/9, 2012 at 2:16 Comment(0)
A
5

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.

Astromancy answered 8/8, 2014 at 11:29 Comment(0)
A
0

Even if you're on a Mac or Linux, copy and paste it exactly as it is on the site where you found it. I have had problems when I introduce any extra tabs etc.

Argufy answered 14/9, 2024 at 16:25 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.