在maven项目里运行某一个class的main方法

可以在maven项目里运行某一个带有maven方法的class。以这个项目为例子:

Clone完项目以后,运行下面的命令:

$ mvn -q exec:java -Dexec.mainClass="io.weli.lang.RunExample3"

代码执行情况如下:

参考资料:

My Github Page: https://github.com/liweinan

Powered by Jekyll and Theme by solid

If you have any question want to ask or find bugs regarding with my blog posts, please report it here:
https://github.com/liweinan/liweinan.github.io/issues