在 Eclipse 3.2 中使用 Maven 2 Plug-in
本节涵盖了 Eclipse 中 Maven 2.x Plug-in 的一些常用功能。
在您的项目可以使用 Maven 2 插件功能前,需要在一个 Eclipse 项目中启用 Maven 属性。右键单击您想要向其中添加 Maven 支持的项目,选择 Maven2>Enable。
为确保项目的目录结构符合 Maven 的预期,您应先创建 Maven 目录结构(或者手动或者使用 Archetype),然后将该项目添加到 Eclipse 中。
在存储库中实时搜索依赖项
使用插件将依赖项添加到 pom.xml 很简单。右键单击该项目的 pom.xml,然后选择 Maven2>Add Dependency。这会启动 Repository Search 向导。键入您要寻找的依赖项名称开头的一些字母,该向导会在中央存储库中搜索任何相匹配的工件。相匹配的工件的所有详情都会呈现给您,以帮助您选择依赖项。图 11 显示了搜索 JUnit 工件的结果:
图 11. Maven Repository Search 向导
一旦选定了想要的工件的版本,单击 OK,插件就会自动地将一个新的 <dependency>
元素添加到 pom.xml 中。
回页首
调用 Maven 构建
一个构建涉及到能从 Eclipse 中启动的生命周期的任何阶段。首先,确保启用了 Maven 的项目当前是打开的。然后,从 Eclipse 菜单中选择 Run>External Tools>External Tools...。这将显示 External Tools 向导,如图 12 所示:
图 12.使用 Eclipse External Tool 向导通过 Maven 构建
给这个配置文件起名,然后通过单击 Goals... 按钮选择一个生命周期阶段。单击 Run 运行 Maven。
Maven 输出显示在 Eclipse 的 Console 选项卡中。
分享到:
相关推荐
"Eclipse Plugin Development by Example: Beginner's Guide" takes the reader through the full journey of plug-in development, starting with an introduction to Eclipse plug-ins, continued through ...
A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client Applications or Remote Application Platform (RCP+RAP), plus Maven and Gradle tooling, and an XML editor....
A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client Applications or Remote Application Platform (RCP+RAP), plus Maven and Gradle tooling, and an XML editor....
maven 到 eclipse 集成插件jar包 maven3.0+eclipse3.7
A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client Applications or Remote Application Platform (RCP+RAP), plus Maven and Gradle tooling, and an XML editor....
A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client Applications or Remote Application Platform (RCP+RAP), plus Maven and Gradle tooling, and an XML editor....
Maven 1.0.X插件会自动为Eclipse Checkstyle插件生成.checkstyle文件。
A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client Applications or Remote Application Platform (RCP+RAP), plus Maven and Gradle tooling, and an XML editor....
使用 maven 构建 Dex2Jar 后,将/dex-tools/dex2jar-0.0.xx-SNAPSHOT.zip的内容/dex-tools/dex2jar-0.0.xx-SNAPSHOT.zip到一个文件夹中。 在 Eclipse 中选择File > New > Other... > Plug-in Development > Plug-in...
idea创建Maven项目时,报错显示Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources,并且Maven插件内看不到 mybatis-generator。如下图: 折腾了好久发现配置放错地方了,...
Eclipse Luna includes official support for Java 8 in the Java development tools, Plug-in Development Tools, Object Teams, Eclipse Communication Framework, Maven integration, Xtext, Xtend, Web Tools ...
editorconfig-eclipse ...右键点击项目 -> 导出 -> Deployable Plug-ins and Fragments -> "Instal into host.Repository" -> Finish 重启后eclipse顶部会有一个菜单“EditorConfig”。 支持: indent
Eclipse 2020-09(4.17)或更旧的版本(请检查“ Cucumber Eclipse Plug-in”对较新的Eclipse版本的支持); CucumberEclipse插件(通过“帮助”菜单上的“安装新软件...”或“ Eclipse市场...”安装)。 观测值: ...
Window > perferences > General > Startup and Shutdown > 将Plug-ins activated on startup 中的复选框有选择性的勾选去掉。 7 修改MyEclipse编辑JSP页面时的编辑工具 Window > perferences > General > ...
phoenix-plugin使用说明 一、概述 Phoenix-Plugin 是一个使用jdbc封装了操作Hbase的工具类....在maven的工程中,在目录src/main/resources添加一个名为hbase-phoenix.xml的文件。如下目录: src --main --resour
eclipsemave插件文件