1

我在 IntelliJ 中有一个复杂的 maven 项目,我不想在其中使用 JRebel 来加快开发时间。该项目是这样组成的:

ERP-HM
      modulo-nfe

            assinador-nfe importador
            -nfe
            compositor-nfe
            marshaller-nfe
      persistencia

            persistencia-banco
            persistencia-venda
            persistencia-cadastro
            persistencia-nfe
            persistencia-erp
            persistencia-pagamento-recebimento
            persistencia-estoque
            persistencia-utilidades modulos
      -web

            banco- web
            configuracao-web
            seguranca-web
            cadastro-web
            erp-web **
            pagamento-recebimento-web
            components-web
            estoque-web
            venda-web
      utilidades
      gerador-relatorios

粗体的名称只是 pom 项目,法线是有代码的项目......项目 erp-web 是战争项目。我以这种方式在 ERP-HM 项目中配置了 JRebel 插件:

<plugin>
    <groupId>org.zeroturnaround</groupId>
    <artifactId>jrebel-maven-plugin</artifactId>
    <version>1.1.3</version>
    <configuration>
       <packaging>war</packaging>
       <web>
           <resources>
               <resource>
               </resource>
           </resources>
       </web>
    </configuration>
    <executions>
        <execution>
             <id>generate-rebel-xml</id>
             <phase>process-resources</phase>
             <goals>
                 <goal>generate</goal>
             </goals>
        </execution>
     </executions>
</plugin>

在 IntelliJ 中,我已经像 JRebel 向导一样配置了项目:

IntelliJ JRebel 配置

已编辑:添加了 jrebel 日志

-------- HEADER --------
VERSION 2
JVM_ID 43ce9d1ce623bd1d7995a6d2c715000b
JVM_STARTED 1337341646006
LOG_STARTED 1337341646178
-------- EOF HEADER --------
[2012-05-18 08:47:26.187] Rebel properties loaded from /home/hudson/.IntelliJIdea11/config/plugins/jr-ide-idea/lib/jrebel/conf/jrebel.properties:
rebel.env.ide=intellij11
rebel.env.ide_server_start=true
rebel.env.java_version=java16
rebel.env.maven=true
rebel.env.operating_system=unix
rebel.env.server=glassfish
rebel.jasper_plugin=false
rebel.jboss_plugin=false
rebel.log=true
rebel.properties.version=2
rebel.stats.time=146
rebel.weblogic_plugin=false
rebel.websphere_plugin=false

[2012-05-18 08:47:26.196] Found a license file: /home/hudson/.jrebel/jrebel.lic
[2012-05-18 08:47:26.271] License information: {uid=ffc12cd3-d035-4576-871d-0e92fd9c38e5, Name=Hudson Assumpção, limited=true, GeneratedOn=Tue May 15 14:36:55 BRT 2012, Email=brevleq@gmail.com, Seats=1, Product=JRebel, limitedFrom=Sun May 13 14:36:55 BRT 2012, override=false, Organization=Gep, limitedUntil=Thu Jun 14 14:36:55 BRT 2012}
[2012-05-18 08:47:26.282] Now: Fri May 18 08:47:26 BRT 2012 Sun May 13 14:36:55 BRT 2012 Thu Jun 14 14:36:55 BRT 2012
[2012-05-18 08:47:26.282]  JRebel 4.6.2 (201205021440)
[2012-05-18 08:47:26.283]  (c) Copyright ZeroTurnaround OU, Estonia, Tartu.
[2012-05-18 08:47:26.283] 
[2012-05-18 08:47:26.290]  Over the last 1 days JRebel prevented 
[2012-05-18 08:47:26.290]  at least 0 redeploys/restarts saving you about 0 hours.
[2012-05-18 08:47:26.290] 
[2012-05-18 08:47:26.291]  This product is licensed to Hudson Assumpção (Gep) 
[2012-05-18 08:47:26.298]  until June 14, 2012
[2012-05-18 08:47:26.298] 
[2012-05-18 08:47:26.299] *************************************************************
[2012-05-18 08:47:26.299]          Your license is about to EXPIRE!
[2012-05-18 08:47:26.300] *************************************************************
[2012-05-18 08:47:26.300] 
[2012-05-18 08:47:26.301]  This license will expire in 27 days and JRebel will
[2012-05-18 08:47:26.301]  stop working after that. Renew your license at:

[2012-05-18 08:47:26.301]     http://sales.zeroturnaround.com/?1339695415
[2012-05-18 08:47:26.302] JRebel is running with the following internal licensing configuration:
[2012-05-18 08:47:26.302]     License valid? true
[2012-05-18 08:47:26.302]     License flags: [none]
[2012-05-18 08:47:26.303]     License type: LIMITED

不幸的是,当我更改代码并刷新浏览器时,JRebel 无法正常工作,没有任何反应......

4

2 回答 2

2

我删除了 maven 插件并将这个 rebel.xml 添加到我的 Web 应用程序的资源文件夹中:

<classpath>
    <dir name="/home/hudson/projetos/ERP-HM/modulos-web/erp-web/target/erp-web-0.1.0/WEB-INF/classes/">
        <include name="com/hrgi/**"/>
    </dir>
    <jarset dir="/home/hudson/projetos/ERP-HM/modulos-web/erp-web/target/erp-web-0.1.0/WEB-INF/lib">
        <include name="gerador-relatorios*.jar"/>
        <include name="assinador-nfe*.jar"/>
        <include name="compositor-nfe*.jar"/>
        <include name="importador-nfe*.jar"/>
        <include name="marshaller-nfe*.jar"/>
        <include name="banco-web*.jar"/>
        <include name="cadastro-web*.jar"/>
        <include name="componentes-web*.jar"/>
        <include name="configuracao-web*.jar"/>
        <include name="estoque-web*.jar"/>
        <include name="pagamento-recebimento-web*.jar"/>
        <include name="seguranca-web*.jar"/>
        <include name="venda-web*.jar"/>
        <include name="persistencia-banco*.jar"/>
        <include name="persistencia-cadastro*.jar"/>
        <include name="persistencia-erp*.jar"/>
        <include name="persistencia-estoque*.jar"/>
        <include name="persistencia-nfe*.jar"/>
        <include name="persistencia-pagamento-recebimento*.jar"/>
        <include name="persistencia-utilidades*.jar"/>
        <include name="persistencia-venda*.jar"/>
        <include name="utilidades*.jar"/>
    </jarset>
</classpath>

<web>
    <link target="/">
        <dir name="/home/hudson/projetos/ERP-HM/modulos-web/erp-web/target/erp-web-0.1.0"/>
    </link>
</web>

这里包含的 jars 是完整的 maven 项目的一部分。现在 JRebel 工作正常...

于 2012-05-25T17:41:24.640 回答
1

您是从“使用 JRebel 运行”按钮还是从普通的“运行”按钮设置它?

您必须启用日志记录 - 将日志发送给支持人员并告诉您尝试更改哪个类

于 2012-05-18T01:04:44.063 回答