On 05/28/2012 11:39 AM, Paul Moore wrote:
When I try to use Maven as described in the tutorial,
I get an error:
PS D:\Data\Java\x> mvn archetype:generate
-DarchetypeArtifactId=xwiki-commons-component-archetype
-DarchetypeGroupId=org.xwiki.commons -DarchetypeVersion=3.3
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.130s
[INFO] Finished at: Mon May 28 16:35:02 BST 2012
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there
is no POM in this directory (D:\Data\Java\x). Please verify you
invoked Maven from the correct directory. -> [Help 1]
That is not the right behavior of Maven... archetype:generate doesn't
expect a pom to exist already, since the goal of this command is to
generate a pom.
What version of Maven are you using?
mvn -version
should print something like:
Apache Maven 3.0.4
[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/MissingProjectException
I'm a little concerned about the "-DarchetypeVersion=3.3" flag. I'm
using XWiki 4.0. Is this page out of date?
Indeed, you should use the most recent (stable) version available, so 4.0
Sorry if I haven't given the right details, I
haven't used Maven
before so I'm not sure what I should do next.
Paul.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/