- 浏览: 498132 次
- 性别:
文章分类
- 全部博客 (369)
- Java (48)
- Struts (1)
- Spring (4)
- Hibernate (7)
- WebServices (2)
- XML (3)
- web服务器 (12)
- PHP (16)
- FLEX (13)
- Flash (7)
- JavaScript (35)
- Ajax (4)
- Jquery (18)
- EXTJS (7)
- CSS (7)
- HTML (7)
- JSON (5)
- 好玩的 (1)
- 其他 (21)
- Oracle (35)
- mysql (12)
- Linux (12)
- JDBC (2)
- EJB3 (1)
- AOP (1)
- 正则表达式 (6)
- JSF (1)
- 设计模式 (1)
- RBAC (1)
- PowerDesigner (1)
- windows (1)
- 电脑工具软件 (3)
- SEO (3)
- maven (13)
- cms (9)
- JSP (5)
- jpbm (1)
- eclipse (8)
- sql (4)
- android (3)
- 浏览器 (5)
- 国外IT网站 (1)
- 文摘 (1)
- 文档 (31)
- doc命令 (1)
- webgl (1)
- html5 (1)
- ant (1)
- mongodb (0)
- 操作系统 (1)
- Dreamweaver (1)
- hadoop (2)
- xpath (1)
- nutch (1)
- window (1)
- xm (2)
- excel (1)
- httpclient (0)
- YII (2)
- CXF (1)
- Quartz (1)
- jsoup (2)
- wifi (2)
- logback (1)
- 硬件 (1)
- 工具 (3)
- freemark (1)
- ide (2)
- mail (1)
- log (1)
- ueditor (1)
- 链接 (1)
- reaver (2)
- js (1)
- .net (1)
- chrome (1)
- git (1)
- Docker (1)
- unicode (1)
- 多线程 (1)
- 并发 (1)
- Nashorn (3)
- Angular (1)
- curl (1)
- Cygwin (1)
- nashron (1)
- Babel (1)
- React Native (1)
- sip (1)
- openmeetings (1)
- IDEA (0)
- CAS (1)
最新评论
-
沉醉音乐的咖啡:
使用 preventDefault() 函数来阻止对表单的提交。 -
PhoenixHorse:
原表的索引啥的不就失效了吗
oracle修改表精度 -
yupengcc:
资料带走 3Q
RBAC模型 -
Java路:
...
JSON-LIB快速入门(转) -
damoqiongqiu:
utf-8下,E文字符占1个字节,中文字符占3个字节。如果一个 ...
AS3:截取定长度的字符串
http://archive.openmrs.org/wiki/Using_the_M2Eclipse_Maven_Plugin_In_Eclipse
https://wiki.openmrs.org/display/docs/Using+the+M2Eclipse+Maven+Plugin+In+Eclipse#UsingtheM2EclipseMavenPluginInEclipse-HowtoRunWebApplication
- Eclipse 3.4+
- Apache Maven 2.2.1 or later
- M2Eclipse plugin
- Checkout Source and Create Project
- Develop with Maven
- How to run the build
- How to run Junit
- How to Run Web Application
- How to Profile Web Application with YourKit
- How to Debug Web Application
- JVM Hotswap
- Hot Deploy
- Use JRebel
Checkout Source and Create Project
- File → New → Project → Checkout Maven Projects From SCM
- For SCM, choose 'svn' and browse to the project (http://svn.openmrs.org/openmrs/trunk )
- In older versions of the m2eclipse Eclipse plugin (prior to
0.11.0), you have an option to place all modules within a single
project; this feature is deprecated as of m2eclipse 0.11.0
.
Click Advanced, and uncheck "separate projects for modules" (if that doesn't exist, change m2eclipse setting in Window → Preferences → Maven → Support multiple maven modules) - Click Finish to download and create the Maven project(s).
Develop with Maven
There are five projects shown in the workspace: openmrs, openmrs-api, openmrs-test, openmrs-tools, openmrs-web, and openmrs-webapp. The openmrs project is a parent project. When we run any maven goal on the parent project, it will run the same goal on its children, according to the dependency order. A Maven menu item is added on the context menu, which lets you modify the pom.xml, manage dependencies and plugins, etc. Common maven goals are also added on the menu items Run As and Debug As . You can also create your own Maven Run Configurations.
How to run the build
- Right click the openmrs project to bring up the context menu, select "Run as → Maven build..." (notice the "..." at the end)
- Enter the Goals: clean install
- Make sure the Maven Runtime at the bottom is correct for your installation (Configure for Embedded/External as necessary)
- Select Apply, then Run
- The build output will be displayed in the Console.
- The output contains links to the results of each test.
To re-run the build, right click the root project to bring up the context menu, select "Run as -> Maven build." If you have multiple configurations, select the "clean install" one to run.
To manage these configurations, right click the root project to bring up the context menu, select "Run as -> Run configurations...". Select the configuration under the Maven Build section.
How to run Junit
If you want to run all tests across modules, select Openmrs project and right click to bring context menu, select "Run As → Maven test"
If you want to run all tests in one module, select that project and right click to bring context menu, select "Run As → Maven test"
If you want to run a single test class,right click on test class and select "Run As → Junit test"
How to Run Web Application
Create a run configuration by click "Run → Run Configurations", select Maven Build and click "New launch configuration", type Name "OpenMRS", select working directory to be the root of webapp project, type goal "jetty:run" and save. Now you select "OpenMRS" and run or debug it.
On the JRE tab, in the VM parameters box, you will want to put in your memory parameters, e.g.
-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -XX:NewSize=128m
|
See Troubleshooting Memory Errors or Performance Tuning or Increasing Memory for Maven
Current configuration of Jetty is that it will reload static resources like jsp, javascript files etc. If there is any java class change, It will require to run maven:compile goal (if auto build is not enabled) and restart Jetty.
How to Profile Web Application with YourKit
Set up a run configuration as specified in "How to Run Web Application" but in the JRE tab, set the -agentpath VM option as specified in the YourKit docs . Common values:
- Linux x86, 32-bit Java: -agentpath:<profiler directory>/bin/linux-x86-32/libyjpagent.so
- Mac OS X: -agentpath:<profiler directory>/bin/mac/libyjpagent.jnilib
- Windows, 32-bit Java: -agentpath:<profiler directory>\bin\win32\yjpagent.dll
(This assumes you have YourKit installed already.)
How to Debug Web Application
Jetty plugin can pick up any changes of static resources, so changes of jsp, property or css files don't require a restart. However changes of java class will have to restart. The following solutions could help in some situations.
JVM Hotswap
Not yet documented. |
Hot Deploy
Not yet documented. |
Use JRebel
Here is how you configure JRebel to work with OpenMRS
- Download JRebel and install it. http://www.zeroturnaround.com/jrebel/current/
- Install JRebel plugin for Eclipse and restart.
http://archive.openmrs.org/wiki/Image:Eclipse-jrebel1.jpg - Configure JRebel plugin for Eclipse.
http://archive.openmrs.org/wiki/Image:Eclipse-jrebel2.jpg
Specify location of JRebel installation
http://archive.openmrs.org/wiki/Image:Eclipse-jrebel3.jpg
Tick "Use Step filters" and also add com.zeroturnaround.* and org.zeroturnaround.* to the filters Tick "filter synthetic fields"
- Configure JRebel Agent Setting provided by JRebel installation
http://archive.openmrs.org/wiki/Image:Eclipse-jrebel4.jpg
Untick "Spring Framework Plugin" - Change "OpenMRS" Run configuration to increase Permgen and enable JRebel.
http://archive.openmrs.org/wiki/Image:Eclipse-jrebel5.jpg - Run or Debug "OpenMRS"
When you change any java classes, just wait for eclipse auto build to finish, reload the web page, and JRebel will reload the class for you.
发表评论
-
maven 常用命令
2015-07-15 15:42 6721. 创建Maven的普通java ... -
maven中指定main方法并且导入关联jar包,拷贝依赖包
2015-03-05 10:21 701<build> <plugins& ... -
mvn tomcat7:run debug sourcelookup faile
2014-07-24 20:00 1159Source not found might be leg ... -
mvn tomcat7:run config
2014-07-24 16:37 810<project xmlns="http: ... -
maven-dependency-plugin (goals “copy-dependencies”, “unpack”) is not supported b
2013-09-19 18:45 1151POM文件报错maven-dependency-plugin ... -
maven jar安装到本地
2012-03-09 09:40 1655Sometimes, you project will h ... -
Maven 文档
2012-02-26 19:36 814a -
eclipse maven插件项目改名 问题
2012-02-09 13:55 1424eclipse maven插件 按f2对项目直接改名web.x ... -
关于Apache Maven您不知道的5件事-5个技巧
2011-11-20 09:28 969Maven 是为Java开发人员提供的一个极为优秀的构建工具, ... -
配合m2eclipse创建一个标准的maven web项目.,Java,maven
2011-09-08 16:44 1371maven是一个近几年比较流行的jar包管理工具.很多开源项 ... -
安装Maven后提示找不到JDK的错误 。The Maven Integration requires that Eclipse be running in a
2010-07-27 19:10 1936http://www.blogjava.net/itvin ... -
Maven2上路
2010-07-27 13:32 1057Maven2上路 http://feigme.iteye.c ...
相关推荐
### Eclipse Maven Plugin 插件安装与配置指南 #### 一、引言 在现代软件开发过程中,Maven作为一款强大的构建工具,极大地简化了项目的构建流程。为了更好地集成Maven的功能,Eclipse提供了名为Eclipse Maven ...
m2eclipse不仅支持Maven的标准生命周期,还可以与许多第三方Maven插件配合,如maven-compiler-plugin、maven-surefire-plugin等,使得在Eclipse中可以便捷地使用这些插件的功能。 8. **集成Eclipse特性** m2...
**m2eclipse:Eclipse的Maven集成插件** m2eclipse是Eclipse集成开发环境(IDE)中的一个非常重要的插件,它将Apache Maven的构建和项目管理功能无缝地整合到了Eclipse中。Maven是一个强大的项目管理和依赖管理工具...
直接离线安装eclipse中的maven插件,在你的eclipse安装根目录下创建两个文件夹:links,myplugins(文件夹名字可以自定义),所在路径D:\eclipse。将下载下来的maven插件放到myplugins下。载links目录下创建一个...
**eclipse-maven3-plugin** 是一个专门为 Eclipse IDE 设计的插件,它允许开发者在 Eclipse 开发环境中无缝集成 Maven 构建工具。Maven 是一个项目管理和综合工具,广泛用于 Java 应用程序的构建、依赖管理和项目...
"Eclipse Maven Plugin" 是一个专门为Eclipse集成开发环境设计的插件,它使得在Eclipse中管理和构建Maven项目变得更为便捷。Maven是一个广泛使用的项目管理和综合工具,它通过配置文件(pom.xml)来管理项目的依赖、...
【maven-eclipse-plugin】是Maven生态中的一个重要插件,它主要负责将Maven项目导入Eclipse这样的IDE中,以便于开发人员进行便捷的开发和管理。在使用Maven时,理解并熟练掌握这个插件的使用对于提高开发效率至关...
eclipse-maven3-plugin.7z 解压缩到 plugins 目录下 3. 在 links 目录下创建一个maven.link(名字可以随便取,但必须是.link结尾的文件)文件 打开并输入:path= D:/Development/eclipse-JavaEE/eclipse/plugins...
Eclipse Maven3 插件,通常被称为 m2e(Maven Integration for Eclipse),是Eclipse IDE中的一个核心组件,用于支持Maven构建工具的集成。这个插件使得开发者能够在Eclipse环境中无缝地管理Maven项目,包括构建、...
Eclipse的Maven插件m2eclipse是开发人员在集成开发环境中管理Maven项目的重要工具。m2eclipse 1.6.2是该插件的一个特定版本,旨在提供更好的性能、稳定性和功能增强。以下是对这个插件及其版本的详细解释: 一、m2...
Note about 0.9.8 Workspace Incompatibility: If you are using m2eclipse 0.10.0 with a workspace that contains projects created under m2eclipse 0.9.8, you must remove the workspaceState.ser file....
【Maven Eclipse Plugin详解】 Maven Eclipse Plugin是Apache Maven项目的一部分,它主要负责将Maven构建过程与Eclipse IDE集成,使得开发人员能够在Eclipse环境中方便地管理Java项目的依赖、构建以及生命周期。这...
插件名称:m2eclipse、SVN、汉化插件 Eclipse版本:Eclipse3.7(eclipse-jee-indigo-SR2-win32.zip) 安装方式:link方式安装 操作系统:windows xp 安装步骤: 1、 将eclipse-jee-indigo-SR2-win32.zip解压到文件夹; ...
Eclipse 3.5.1 Maven Plugin 是一个用于集成Maven构建系统到Eclipse IDE的插件,使得开发者能够在Eclipse环境中便捷地管理Maven项目、执行构建生命周期、解决依赖和配置问题。这个插件极大地提高了Java开发者的生产...
Eclipse Maven3 Plugin是Eclipse集成开发环境中的一个插件,用于支持Maven项目管理和构建。这个插件使得开发者在Eclipse内部就能方便地管理Maven依赖、执行Maven生命周期阶段以及配置Maven项目,无需离开IDE。在描述...
**m2eclipse Maven 插件详解** 在Java开发领域,Maven是一个广泛使用的构建工具,它通过项目对象模型(Project Object Model, POM)来管理项目的构建、报告和依赖关系。Eclipse作为流行的Java集成开发环境(IDE),...