when I built a webApp maven project by IDEA,IDEA shows me an error,why? when i built my project in cmd ,it can success?

when I built a webApp maven project in IDEA,IDEA shows me an error,why? when i built my project in cmd ,it can success?Please give me some help.Thanks very much!!

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.apache.maven.archetypes:maven-archetype-webapp:RELEASE) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

1 answer

  • answered 2019-10-08 05:54 Villat

    You've created your project doing this: File -> New -> Project -> Maven -> (Create from Archetype) -> maven-archetype-webapp -> Next

    After that, you filled your GroupId and ArtifactId

    The next screen is the one that you need to modify: edit the archetypeVersion and set it to 1.4 (you could select one version from here)

    Maven archetype

    Then continue the process until the end, and you should be able to run your project from IntelliJ