On 29 May 2012 10:09, Paul Moore <p.f.moore(a)gmail.com> wrote:
  On 29 May 2012 09:47, Jeremie BOUSQUET
<jeremie.bousquet(a)gmail.com> wrote:
  After some googling, seems that archetype plugin
likes to throw this
 error in some occasions completely unrelated to what the error message
 says ...
 Maybe you could also check :
 - there is no backslash "\" in your command-line 
 Other than the path to the "mvn" command, and paths in environment
 variables like JAVA_HOME, no, there are no backslashes (see the
 original mail in this thread).
  - try adding more command-line options (specify
-DgroupId , -Dversion,
 -DartifactId and so on to specify the coordinates of the  project to
 create) 
 I'll see what I can do, but I have basically zero knowledge of Maven,
 so apologies in advance if any wild guesses I try just confuse things
 :-) 
Bizarre. It appears that it works in CMD.EXE fine, but fails in
Powershell (which is my shell of choice). I have absolutely no idea
why this might be the case.
(A few minutes later, after some googling...) It appears that the "="
sign in the mvn command is treated specially by Powershell, and needs
to be quoted when used in a mvn command. I've never encountered this
before, and I suspect it's not *quite* that simple and somehow relates
to the interaction of Powershell and the mvn command being a bat file.
Nevertheless, quoting the -D parameters works in Powershell:
mvn archetype:generate
"-DarchetypeArtifactId=xwiki-commons-component-archetype"
"-DarchetypeGroupId=org.xwiki.commons" "-DarchetypeVersion=4.0"
"-DgroupId=com.acme" "-DartifactId=example"
"-Dversion=1.0-SNAPSHOT"
Paul.