在 Eclipse 中构建并执行 Maven 项目

built and execute a maven-project in eclipse

我正在尝试构建运行一个使用maven和eclipse Kepler的项目。我知道我应该 运行(在 linux 下使用终端)以下命令来构建和执行我的项目:

mvn clean install

mvn exec:java -Dexec.mainClass="com.example.App"

但我想知道如何在 eclipse 下构建和执行我的项目。

在我的 eclipse 中,我总共有六个命令:maven build、maven build...、maven clean、maven generate-sources、maven install 和 maven test。

如何在 Eclipse构建执行 我的项目?

嗯,解决方法如下:

right-click on  pom.com  -> you get many options-> you choose built->
enter in launch configuration: clean compile package -> click ok

构建过程完成后,单击您的 application.java,然后单击 运行(绿色按钮)。就这些