开发者

Maven archetype

Why this works(and then asks step by step arguments which I can define manually)

C:\Users\userName>mvn archetype:generate

And this doesn't with arguments already specified? (it is example from http://maven.apache.org/guides/getting-started/index.html)

C:\Users\userName>mvn archetype:generate \ -DarchetypeGroupId=org.apache.maven.archetypes \ -DgroupId=com.mycompany.app \ -DartifactId=my-app

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.124s
[INFO] Finished at: Sat Aug 20 22:11:56 BST 2011
[INFO] Final Memory: 5M/122M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\userName. Please verify you invoked Maven from the correct directory. -> [Help 1

The first approach also doesn't find POM, but then it creates everyth开发者_如何学Pythoning itself...


theotherian answered your question correctly. Here's some additional information. The backslashes in your command were line continuations. The example you copied from http://maven.apache.org/guides/getting-started/index.html was written on several different lines. The \ indicates that the command is meant to be all on one line, but was broken up for the sake of readability and screen space. If they weren't there and you just copied and pasted it into a command prompt, every line would be interpreted as a separate command.


Just tried running your command. When I remove the instances of \ it works fine for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜