`
wangbin118
  • 浏览: 15549 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

MyEclipse10+maven+jetty运行项目更改项目代码必须重启处理办法

 
阅读更多

问题背景:

         在myeclipse10下用其自带的maven 运行jetty,在开发项目时,每修改一个地方(非接口或方法)都得重新启动项目才能看到修改结果,给开发带来了很大的不便,经网上查询处理办法如下:

 

0、安全考虑,先把代码提交,关掉myeclipse
1、解压jrebel.zip(见附件)到..\MyEclipse\myPlugins
2、cmd打开命令行
3、cd进入..\MyEclipse\myPlugins\jrebel\bin
4、输入activate.cmd ./jrebel.lic  回车
5、输入activate.cmd ../jrebel.lic 回车
6、cd进入项目根路径
7、输入mvn javarebel:generate 回车
8、输入set MAVEN_OPTS=-noverify -javaagent:D:\MyEclipse\myPlugins\jrebel 回车
9、配置pom.xml ,打开myeclipse
配置中增加:
 <!-- jrebel start-->
 <repositories> 
        <repository> 
            <id>zt-repo</id> 
            <url>http://repos.zeroturnaround.com/maven2</url> 
        </repository> 
 </repositories>
 
 <pluginRepositories> 
         <pluginRepository> 
      <id>zt-repo</id> 
      <name>Zero turnaround repo</name> 
      <url>http://repos.zeroturnaround.com/maven2</url> 
         </pluginRepository> 
 </pluginRepositories> 
<!-- jrebel end-->
插件中增加:
<!-- jrebel start-->
 <plugin>
  <groupId>org.zeroturnaround</groupId> 
        <artifactId>javarebel-maven-plugin</artifactId> 
     <version>1.0.5</version> 
     <executions> 
         <execution> 
            <id>generate-rebel-xml</id> 
            <phase>process-resources</phase> 
            <goals> 
           <goal>generate</goal> 
          </goals> 
         </execution> 
     </executions> 
 </plugin>
 <plugin>  
    <groupId>org.zeroturnaround</groupId>
        <artifactId>javarebel-maven-plugin</artifactId>
 <version>1.0.5</version>
 <executions>
     <execution>
        <id>generate-rebel-xml</id>
        <phase>process-resources</phase>
        <goals>
    <goal>generate</goal>
        </goals>
     </execution>
  </executions>
 </plugin>
 <!-- jrebel end -->
10、项目跑一下,欧了

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics