Closed jhillbounce closed 1 year ago
Fwiw, the problem seems to be that for some reason PowerShell splits the first argument after the first .
, interpreting -DarchetypeGroupId=net.ltgt.gwt.archetypes
as -DarchetypeGroupId=net
followed by .ltgt.gwt.archetypes
. This is made clear by the syntax highlighting in the shell.
To me, this is something that a PowerShell user should be aware of (they'll already not copy-paste from the README because \
is not the escape character in PowerShell), and there are several solutions to this:
mvn archetype:generate "-DarchetypeGroupId=net.ltgt.gwt.archetypes"
or -DarchetypeGroupId="net.ltgt.gwt.archetypes"
,-
: mvn archetype:generate `-DarchetypeGroupId=net.ltgt.gwt.archetypes …
,--%
to pass the arguments as-is without parsing: mvn --% archetype:generate -DarchetypeGroupId=net.ltgt.gwt.archetypes …
I'm reluctant to add anything in the README that's not directly related to the archetype: you'll have the issue with many more invocations of Maven (and other tools) than that archetype:generate
(which you can also execute by other means: e.g. just use mvn archetype:generate
without further argument and then select the archetype from the prompts).
Thanks for looking that over! My thought is that there are at least 2 people now that did not know that PowerShell would do that and presumably others. Since the gwt maven archetype is the way many people will experience GWT for the first time, I thought it would be helpful to get them on board with as little confusion as possible. (Running the command in PowerShell says something like a pom is required to execute the command - but the archetype is being used to create a pom)
Perhaps we could say on Windows it's recommended to use the command prompt to avoid unnecessary escaping of this command? Thoughts?
In any system it's recommended that you know the peculiarities of the tools you use :wink: (my personal recommendation for Windows is to actually use Linux, through WSL, unless you have a really good reason not to; but I don't want to start a flamewar :sweat_smile:)
🤐
PowerShell requires quotes around the parameters to properly create the project. (otherwise the command fails mentioning that a pom needs to exist in the directory)