java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher when running bash file to build the project

前端 未结 2 909
悲哀的现实
悲哀的现实 2020-12-18 23:51

hi guys i have maven 2 installed, when i use mvn clean or mvn install in the app root it works fine but when trying to use maven install inside a bash script i got the above

相关标签:
2条回答
  • 2020-12-19 00:22

    Couple of possibilities...

    • One, as posted here, you have both M2_REPO and M3_REPO variables defined.
    • Or you are facing this issue related to maven3 and M2_HOME
    • The other is that somehow the JRE is getting used instead of JDK when run from the batch file!
    0 讨论(0)
  • 2020-12-19 00:25

    I had this issue when my M2_HOME environment variable points to an incorrect location.

    Try to:

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