Running Maven commands on the command line in Eclipse

Running Maven commands on the command line in Eclipse

 

I am trying to use Maven to export my project into a JAR file, however I am also trying to export the dependencies as well and I am using the shade plugin, however I am wondering how exactly would I then run it? I read I need to run “mvn shade:shade”, however I don’t exactly know where I run this? in the terminal I get ‘mvn’ is not recognized as an internal or external command, operable program or batch file. So I don’t really know where I am supposed to run this

——

Note: This solution assumes that your project is configured/imported as a Maven project.

Right-click the project in Eclipse. Select Run as > Maven build… > Goals, type package and then click Run.

Following best practices, you should not run shade:shade from the CLI (which you are actually doing with this approach), but rather bind the shade plugin to the package phase.

This link will explain how to do that, if you haven’t already done it.

 

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注