Maven Build Failure when calling mvn without lifecycle phase or goal

前端 未结 3 1942
我寻月下人不归
我寻月下人不归 2020-12-31 23:36

Am try to build my project using Maven on Eclipse. The first build was awesome. After that I get this error :

SLF4J: Failed to load class \"org.slf4j.impl.St         


        
相关标签:
3条回答
  • 2021-01-01 00:18

    Maven is a build tool, but unlike ant there is not "default" goal. So when you run

     mvn
    

    You are not supplying enough arguments, you need to run something like

     mvn test
    

    Where the second argument indicates where along the build lifecycle you wish to stop. Maven will then run every step up to the one you specified.

    Some common stopping points

     mvn compile (just compile)
     mvn test (compile and run unit tests)
     mvn package (compile, run unit tests, and build the distributable package)
     mvn install (all of the above, and install distributable package into local repository.
         Install is very useful if you need to build other packages which depend on changes
         to this package)
     mvn deploy (all of the above, and install package into remote (aka public) repository
         for sharing with other developers)
    
    0 讨论(0)
  • 2021-01-01 00:22

    You have to specify a build goal, e.g. compile or install. Check your eclipse launch configuration.

    0 讨论(0)
  • 2021-01-01 00:23

    You can set a goal through command or eclipse :

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