mvn archetype:generate does not work-no plugin found for prefix 'archetype'

后端 未结 15 1320
挽巷
挽巷 2020-12-01 09:05

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

         


        
相关标签:
15条回答
  • 2020-12-01 09:49

    If this warning is accompanied by the warning:

    Received fatal alert: protocol_version
    

    Then check your java version. I was able to solve this issue by upgrading my java version from 7 to 10. See the following:

    https://github.com/technomancy/leiningen/issues/2364

    0 讨论(0)
  • 2020-12-01 09:51

    Had same issue and the thing that worked for me was reinstalling java

    1. sudo yum install java
    2. Find the path where java is installed, you can use which java or whereis java or sudo find / -name javac

      For me, it was /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin

    3. sudo vi ~/.bashrc

    4. add below lines

      export PATH=$PATH:/usr/lib/jvm/java-11-amazon-corretto.x86_64/bin

    5. source .bashrc

    and then try your command - mvn archetype:generate.

    0 讨论(0)
  • 2020-12-01 09:53

    Got the same issue with maven 3. I just upgraded from jdk7 to jdk8 and the issue was resolved

    0 讨论(0)
  • 2020-12-01 09:54

    I had same problem. Root cause: typed mvn generate:archetype instead archetype:generate.
    mvn archetype:generate - is correct way.

    0 讨论(0)
  • 2020-12-01 09:55

    The other thing that could be going wrong is that your machine is behind a firewall or proxy so your box is not able to hit http://repo1.maven.org/maven2. Try accessing this URL directly in a browser or something to test if you are able to make the request.

    0 讨论(0)
  • 2020-12-01 09:56

    Since Apache Maven repository URL is updated from http://repo.maven.apache.org/maven2/ to https://repo.maven.apache.org/maven2/ in NetBeans 8.2 or lower version we are facing this issue.

    So what's the solution?

    Solution 1:- User Terminal to download an updated maven dependencies Check out this Guide on Maven.Apache.Org

    Solution 2:- Update your NetBeans, Move to Apache NetBeans 11

    0 讨论(0)
提交回复
热议问题