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
            componentes-web
            estoque-web
            venda-web
      utilidades
      gerador-relatorios

The names in bold are just pom projects, the normals are the projects with code... The project erp-web is the war project. I've configured the JRebel plugin in ERP-HM project this way:

<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>

In IntelliJ I've configured the project like JRebel wizard tell:

IntelliJ JRebel 構成

EDITED: added jrebel log

-------- 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

unfortunately JRebel isn't working cause when I change code and refresh browser nothing happens...

4

2 に答える 2

2

Maven プラグインを削除し、この rebel.xml を Web アプリケーションの resources フォルダーに追加しました。

<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>

ここに含まれる jar は、完全な Maven プロジェクトの一部です。現在、JRebel は正常に動作しています...

于 2012-05-25T17:41:24.640 に答える
1

「Run with JRebel」ボタンから設定しますか、それとも通常の「Run」ボタンから設定しますか?

ログを有効にする必要があります。ログをサポートに送信し、どのクラスを変更しようとしたかを伝えてください。

于 2012-05-18T01:04:44.063 に答える