You don’t have to cd into the folder to build the maven project

Hello again dear reader! 🙂

About two weeks ago i realized a thing about maven, which will come in handy when working on my build scripts again.

The title already says it pretty much. You don’t have to cd into the project folder. You can just use the -f parameter and give maven the path to the directory to where the pom can be found.

Example:

mvn -f D:\temp\mvnfromafar\ clean install 

Enter fullscreen mode Exit fullscreen mode

This is also possible but not necessary:

mvn -f D:\temp\mvnfromafar\pom.xml clean install 

Enter fullscreen mode Exit fullscreen mode

原文链接:You don’t have to cd into the folder to build the maven project

© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容