Error "The goal you specified requires a project to execute but there is no POM in this directory" after executing maven command
This link helped: https://stackoverflow.com/a/11199865/1307104
I edit my command by adding quotes for every parameter like this:
mvn install:install-file "-DgroupId=org.mozilla" "-DartifactId=jss" "-Dversion=4.2.5" "-Dpackaging=jar" "-Dfile=C:\Users\AArmijos\workspace\componentes-1.0.4\deps\jss-4.2.5.jar"
It's worked.
For any of those who are experiencing this on Windows and none of the above worked, try running this from cmd.exe. Executing these commands via PowerShell caused the install to fail each time.
On Windows when you are using PowerShell you have to enclose all parameters with quotes.
So if you want to create a maven webapp archetype you would do as follows:
Prerequisites:
- Make sure you have maven installed and have it in your PATH environment variable.
Howto:
- Open windows powershell
- mkdir MyWebApp
- cd MyWebApp
- mvn archetype:generate "-DgroupId=com.javan.dev" "-DartifactId=MyWebApp" "-DarchetypeArtifactId=maven-archetype-webapp" "-DinteractiveMode=false"
Note: This is tested only on windows 10 powershell