`

Maven集成 - Eclipse IDE

阅读更多
Maven Book(en) - http://www.sonatype.com/books/m2eclipse-book/reference/index.html
1). Installing m2eclipse Core Components
To install m2eclipse, use the following Eclipse update site to install the core of the m2eclipse plugin. This Core update site contains a single component: "Maven Integration for Eclipse (Required)". When you install this component you will be installing all of the core Wizards, the POM Editor, Maven Repository integration, and Maven integration:

m2eclipse Plugin: http://m2eclipse.sonatype.org/sites/m2e

To install this plugin in the Eclipse IDE:
Select Help > Install New Software. This should display the "Install" dialog.
Paste the Update Site URL into the field named "Work with:" and press Enter. Pressing Enter should cause Eclipse to update list of available plugins and components.
Choose the component listed under m2eclipse: "Maven Integration for Eclipse (Required)".
Click Next. Eclipse will then check to see if there are any issues which would prevent a successful installation.
Click Next and agree to the terms of the Eclipse Public License v1.0.
Click Finish to begin the installation process.
Eclipse will then download and install the necessary components. Once the installation process is finished, Eclipse will ask you if you want to restart the IDE. Sonatype strongly recommends that you restart your IDE after installing m2eclipse.
Warning
You cannot upgrade from m2eclipse 0.9.8 or m2eclipse 0.9.9 to m2eclipse 0.10.0. If you are running m2eclipse 0.9.8 or 0.9.9 you must either uninstall m2eclipse from your Eclipse installation or start with a fresh installation of Eclipse.
If you've installed the plugin successfully, you should see a Maven option in the list of preference categories when you go to Window, Preferences....
2).Installing m2eclipse Extras

In addition to the core m2eclipse components, the following optional components are available from a separate update site. If you plan to use m2eclipse to materialize projects from Subversion or CVS, integrate Maven with the Eclipse Web Tools Project (WTP), or use the m2eclipse Mylyn integration you will need to install the following, extra components:
         Maven SCM Integration
         Maven SCM handler for Team/CVS
         Maven SCM handler for Subclipse
         Maven issue tracking configurator for Mylyn 3.x
         Maven Integration for WTP
         M2Eclipse Extensions Development Support


To install optional m2eclipse components, use the m2eclipse Extras update site. This update site contains the following m2eclipse components:

m2eclipse Extras Update Site: http://m2eclipse.sonatype.org/sites/m2e-extras

3). Installing Optional Prerequisites
Several of the extra components listed in the previous section require third-party plugins to be installed prior to installation. You can install these prerequisites when you install m2eclipse, just add a new remote update site to Eclipse for each of the prerequisite components.
To install these prerequisites, select Help, Install New Software... which will load the "Software Updates and Add-ons" dialog. In this dialog, choose the Available Software panel and click on Add Site... which will load the simple "Add Site" dialog. Enter the URL of the update site you wish to add and click OK. In the "Software Updates and Add-ons" dialog, the available plugins from an update site will appear as soon as the site is added. You can then select the modules you want to install and click the Install... button. Eclipse will then resolve all the dependencies for the selected plugins, and ask you to agree to the plugin license. After Eclipse installs new plugins, you should restart the IDE.
3.1).Installing Subclipse
When you install Subclipse, you will need to make a decision about Subversion compatibility. If you are using Subversion 1.5.x client features, you will need to install Subclipse version 1.4. If you are using Subversion 1.6.x client features, you will need to install Subclipse version 1.6.
To install Subclipse, use one of the Eclipse plugin update sites listed below.

Subclipse 1.4 (for Subversion 1.5 compatibility): http://subclipse.tigris.org/update_1.4.x

Subclipse 1.6 (for Subversion 1.6 compatibility): http://subclipse.tigris.org/update_1.6.x

For other versions of Subclipse, and for more information about the Subclipse plugin, please see the Subclipse project's web site at http://subclipse.tigris.org/.
3.2).Installing Mylyn
To install JIRA or Trac integration with Mylyn, add the Mylyn extras Eclipse update URL, you'll want to do this if your organization uses Atlassian's JIRA for issue tracking. To install Mylyn use the following update sites:

Mylyn (Eclipse 3.4, 3.5, and 3.6M4): http://download.eclipse.org/tools/mylyn/update/e3.4
Mylyn Extras (JIRA and Trac Support): http://download.eclipse.org/tools/mylyn/update/extras

For more information about the Mylyn project, see the Mylyn project's web site at http://www.eclipse.org/mylyn/.
3.3). Installing the Web Tools Platform (WTP)
To install the Web Tools Platform (WTP). Install the "Eclipse IDE for Java EE Developers" from http://www.eclipse.org/downloads/, or download a WTP release from http://download.eclipse.org/webtools/downloads/.
For more information about the Web Tools Platform, see the Web Tools Platform project's web site at http://www.eclipse.org/webtools/.


4).设置maven路径变量(可选,如果Eclipse中没有这个环境变量则配置)
在eclipse中设置maven路径变量,让eclipse知道Maven 2的repository(仓库)的路径,因此要设置一个M2_REPO的变量为classpath。

1.使用命令行的方式来设置:
mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo

2.在eclipse中定义一个新的classpath变量通过在eclipse的菜单上选择Window> Preferences. 选择Java > Build Path > Classpath Variables

M2_REPO=C:/Documents and Settings/${username}/.m2/repository

分享到:
评论

相关推荐

    Eclipse IDE Mac OS X 64位

    Eclipse IDE Mac OS X 64 bit Eclipse IDE for Java Developers 该版本适合Java开发者,集成CVS,Git,XML编辑器,Mylyn, Maven integration和WindowBuilder等插件。

    fmt-maven-plugin:有思想的Maven插件可格式化Java代码

    如果您希望IDE保持相同的格式,则按照上的安装说明,google-java-format还包括IntelliJ和Eclipse IDE的集成。 用法 标准pom.xml 要在每个构建中自动格式化源,请添加到pom.xml中: &lt; groupId&gt;...

    Eclipse IDE Java win64位

    Eclipse IDE for Java Developers 该版本适合Java开发者,集成CVS,Git,XML编辑器,Mylyn, Maven integration和WindowBuilder等插件。

    chm版本Maven教程

    转换基于Maven的Web应用程序支持Eclipse IDE 使用Maven模板创建项目 使用Maven构建项目 使用Maven清理项目 使用Maven运行单元测试 将项目安装到Maven本地资源库 生成基于Maven的项目文档站点 使用“mvn site-deploy...

    Eclipse IDE Linux64位

    Eclipse IDE for Java Developers 该版本适合Java开发者,集成CVS,Git,XML编辑器,Mylyn, Maven integration和WindowBuilder等插件。

    Eclipse IDE for Java

    Linux 32位版本 Eclipse IDE for Java Developers 该版本适合Java开发者,集成CVS,Git,XML编辑器,Mylyn, Maven integration和WindowBuilder等插件。

    Eclipse IDE for win32位

    Eclipse IDE for Java Developers 该版本适合Java开发者,集成CVS,Git,XML编辑器,Mylyn, Maven integration和WindowBuilder等插件。

    Java混淆器Allatori-7.5@集成eclipse编译

    对外接口联调保护你的Java源码-Java混淆器Allatori-7.5@集成eclipse编译 Obfuscation with Setting Classpath Single Jar Packaging Introduction to Watermarks Using Stack Trace Utility Integration with Apache...

    scalor-maven-plugin:用于Java,Scala,Scala.macro,Scala.js,Scala.native,Eclipse和Maven的构建集成器

    为Java,Scala,Scala.macro,Scala.js,Scala.native,Eclipse和Maven构建集成器。 安装 生产发布 开发发布 适用于Scala IDE 4.7的Scalor插件1.X 相似的插件 入门 设置 建立并研究 插件功能 Scala 新增量 使用...

    eclipse-pmd:eclipse-pmd已移至

    蚀pmd eclipse-pmd插件将著名的源代码分析器PMD集成到Eclipse IDE中。 每次保存工作时,eclipse-pmd都会扫描源代码并查找潜在的问题,例如可能的错误以及次优,重复,无效或过于复杂的代码。 可能的话,eclipse-pmd...

    ecosystem:一组用于构建Scala IDE生态系统更新站点的Maven项目

    这是生态系统构建器,这是一个基于的系统,它使用Scala-IDE在Eclipse,Scala和Scala-IDE的特定风味之外,在Eclipse更新站点内构建和集成与Scala相关的插件。 该项目源的最新版本托管在: : 遗产 stable-scala-ide-...

    Eclipse安装包!

    它是一个非常流行的Java集成开发环境(IDE),可以用于开发各种类型的应用程序,包括Java应用程序、移动应用程序、Web应用程序等。Eclipse是一款跨平台的IDE,可以在Windows、Linux和Mac OS X等操作系统上运行。 ...

    Maven实战(高清版)

    xml2.7.3 不要使用ide内嵌的maven2.8 小结第3章 maven使用入门3.1 编写pom3.2 编写主代码3.3 编写测试代码3.4 打包和运行3.5 使用archetype生成项目骨架3.6 m2eclipse简单使用3.6.1 导入maven项目3.6.2 ...

    Luna(eclipse4.4)集合众多插件

    这个本人亲手整理的Luna(eclipse4.4),集成了不少插件,插件均能干净卸载,强迫症也可以无烦恼啦,而且优化了配置,持续更新中...... # 安装插件记录 ## markdown (开源爱好者必备) ## emmet (前端必备) ## SVN...

    m2e-core

    面向Maven的Eclipse IDE集成(Eclipse m2e项目) M2Eclipse通过以下功能将Apache Maven与Eclipse IDE紧密集成: 用于pom.xml文件的丰富编辑器 从Eclipse中启动Maven构建 基于Maven的pom.xml的Eclipse构建路径的...

    maven 项目管理

    建立支持Maven2的开发框架,框架中结合了一些项目功能和工具类,并且此框架本身是一个eclipse工程,支持使用eclipse IDE的开发,并通过CVS可进行团队协作。 2.在Maven2的pom.xml中制定开发框架的依赖包,并建立...

    java图书馆swing源码-m2eclipse-scala:m2eclipse-scale

    之间的集成。 问题跟踪器: 邮件列表 : 更新站点: 以前版本的更新站点遵循模式:.. 工作配置 通过将示例项目导入 Eclipse 来“验证”插件: (配置长于单向 scala -&gt; java 或 java -&gt; scala 在 maven 下编译) ...

    xtext:Eclipse Xtext:trade_mark:是一种语言开发框架

    它涵盖了完整语言基础结构的所有方面,从解析器,链接器,编译器或解释器,到用于Eclipse和基于Web的IDE的功能完善的顶级IDE集成。 此外,可以将使用Xtext开发的集成到支持编辑器中(例如 , )。 Xtext在所有这些...

    JNoSQL-Swing-CRUD:一个摆动应用程序,它使用Java的JNoSQL API,将所有四个nosql数据库集成在一个java-se应用程序中

    Eclipse IDE(首选)EE(企业版) Maven :anger_symbol: Redis已安装并正在运行 Couchbase已安装并正在运行 Cassandra已安装并正在运行 MondoDB已安装并正在运行(可选) 好吧! 你很高兴去 :victory_hand:

    2017最新大数据架构师精英课程

    2_java引入ide-eclipse 3_java基础知识-循环-类型转换 4_循环-函数-数组-重载 5_多为数组-冒泡-折半-选择排序 6_oop-封装-继承-static-final-private 7_多态-接口-异常体系 8_适配器/ k% N! Y7 j/ |- c) O5 M' V6 S ...

Global site tag (gtag.js) - Google Analytics