I want to build a simple project using a existing archetype. But I can\'t run mvn archetype:generate
as it keeps telling me the following information
In case you are behind coporate firewall , configure the proxy setting using "settings.xml" under /conf directory username,password,host&port values need to be provided.
|
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
I was banging with this problem 2 days, I checked proxy , copied settings.xml from conf folder , deleted user local .m2 folder , came out of eclipse and installed maven directly and tried . None of the above worked.
Finallay the problem fixed by upgrading java home form 1.7 to 1.8 . My maven version is Apache Maven 3.6.3 .
Maven should report proper error for the specific issue but it is not.
Up voted the suggestion of java upgrade in this thread , previously they were down voted
The command you should be using to generate a project with an archetype is...
mvn archetype:generate
The command you posted in your question was wrong (missing the first 'e' in archetype). I assume this is just a typo in SO though because the error you posted had archetype spelled correctly.
I believe this error will occur if you are trying to execute this command from a directory that already has a pom.xml
file in it. It will try to find an archetype plugin configuration inside the existing pom.xml
file.
Try the command again in an empty directory, or at least in one that doesn't have a pom.xml
file and it should work.