How to run maven generated jar on CLI

前端 未结 2 695
南方客
南方客 2021-01-11 18:29

I\'m trying to get a maven managed project to run on the command line.

I have a set of dependencies in the pom.xml which are subsequently downloaded and installed i

2条回答
  •  抹茶落季
    2021-01-11 19:05

    mvn exec:java -Dexec.mainClass="com.vineetmanohar.module.Main" -Dexec.classpathScope=runtime  
    

    You can find more examples here: 3 ways to run Java main from Maven.

提交回复
热议问题