带有Eclipse IDE的Maven

带有Eclipse IDE的Maven (Maven with Eclipse IDE)

Maven also provides an excellent plugin which helps to integrate both eclipse and maven together. M2eclipse is the plugin used to integrate maven and eclipse. Below are some of the key benefits of this plugin:

Maven还提供了一个出色的插件,可帮助将Eclipse和Maven集成在一起。 M2eclipse是用于集成maven和eclipse的插件。 以下是此插件的一些主要优点:

  • Launching maven builds from the eclipse.

    从Eclipse启动Maven构建。
  • Launching maven goals as well.

    以及启动Maven目标。
  • Managing the dependencies for eclipse build path.

    管理Eclipse构建路径的依赖关系。
  • Automatic download of maven dependencies from the repository.

    从存储库自动下载Maven依赖项。
  • GUI based (wizards based) for creating maven projects.

    基于GUI(基于向导)用于创建Maven项目。
  • Quick fix for the required dependencies.

    快速修复所需的依赖项。

安装m2eclipse插件 (Install m2eclipse Plugin)

Follow the below link to easily install the m2eclipse plugin in your eclipse IDE.

按照以下链接可以在Eclipse IDE中轻松安装m2eclipse插件。

http://books.sonatype.com/m2eclipse-book/reference/ch02s03.html

http://books.sonatype.com/m2eclipse-book/reference/ch02s03.html

在Eclipse中创建Maven项目 (Creating a Maven project in Eclipse)

Below is the step by step explanation on creating a maven project in eclipse.

以下是在Eclipse中创建Maven项目的分步说明。

  1. Open the eclipse. Go to File -> New -> Project and search by the keyword maven and select Maven Project

    打开月食。 转到文件 -> 新建 -> 项目,并通过关键字maven搜索,然后选择Maven Project

    带有Eclipse IDE的Maven

  2. Select the checkbox saying, Create a simple project and click on Next.

    选择复选框, 创建一个简单项目 ,然后单击下一步

    带有Eclipse IDE的Maven

  3. Provide the details for groupId, artifactId, version and packaging as shown below and click on Finish.

    提供有关groupIdartifactId版本包装的详细信息,如下所示,然后单击Finish

    带有Eclipse IDE的Maven

  4. A new project name SampleMavenProject will be created as shown below:

    将创建一个新的项目名称SampleMavenProject ,如下所示:

    带有Eclipse IDE的Maven



And this ends the Maven Tutorial, hope you had a great learning experience.

到此为止,《 Maven教程》结束了,希望您有很棒的学习经验。

翻译自: https://www.studytonight.com/maven/maven-with-eclipse-ide