posts - 33, comments - 46, trackbacks - 0, articles - 2

          Resin Pro 3.1.2 Plugin for IntelliJ IDEA

          Posted on 2007-09-18 11:04 在路上... 閱讀(1813) 評論(2)  編輯  收藏 所屬分類: JAVA相關

          在這里可以下載Resin  Plugin for  IntelliJ IDEA  ,但是對于3.1X好像還不支持。http://plugins.intellij.net/plugin/?id=215
          作者更新太慢,不好意思自己動手反編譯修改了幾個地方,現在可以支持Resin Pro 3.1.2,如果需要地可以從這里
          * 下載:
          Resin_2640_31.zip
          * 安裝:
          修改文件名為Resin_2640_31.jar,復制到C:\Documents and Settings\[username]\.IntelliJIdea60\config\plugins下面
          * 修改記錄
          1、將3.1.2的resin.conf文件命名為resin31.conf加到org\intellij\j2ee\web\resin\resin下面
          2、將ResinVersion.java修改為如下方法判斷是否3.1版本

          public static final ResinVersion VERSION_3_X = new ResinVersion("Resin 3.x"{

                  
          public boolean
           isOfVersion(File file)
                  
          {
                      
          return (new File(new File(file, "lib"), "jsdk-15.jar"
          )).exists();
                  }


                  
          public String getStartupClass()
                  
          {
                      
          return "com.caucho.server.resin.Resin"
          ;
                  }


              }
          3、修改Resin3XConfigurationStrategy.java文件中部分判斷http port、host的代碼
          原來的XML節點為root->server->host->http->port   and  root->server->host->web-app
          3.1下面的XML節點為root->cluster->server-default->http->port and    root->cluster->host->web-app
          改過的代碼為
          Element httpElement = document.getRootElement().getChild("cluster", ns).getChild("server-default", ns).getChild("http", ns);

          Element host = getHost(document.getRootElement().getChild("cluster", ns), ns, webApp);

          List hosts = document.getRootElement().getChild("cluster", ns).getChildren("host", ns);

          public InputStream getDefaultResinConfContent()
              {
                  return getClass().getResourceAsStream("/org/intellij/j2ee/web/resin/resin/resin31.conf");
              }

          原來的作者沒有開源,所以不好做進一步的修改完善,對于3.0的版本應該就不支持了。

          Feedback

          # re: Resin Pro 3.1.2 Plugin for IntelliJ IDEA [未登錄]  回復  更多評論   

          2008-04-30 02:53 by jason
          多謝,關注下!

          # re: Resin Pro 3.1.2 Plugin for IntelliJ IDEA [未登錄]  回復  更多評論   

          2008-04-30 02:56 by jason
          已經有了更新:

          http://sourceforge.net/projects/idearesinplugin/

          Version 4.3 released 2008-01-14
          Version 4.2 released 2007-12-21
          Version 4.1 released 2007-12-19
          主站蜘蛛池模板: 墨玉县| 买车| 博爱县| 肥城市| 嘉鱼县| 紫金县| 巴马| 平潭县| 乌恰县| 康乐县| 当阳市| 平昌县| 科尔| 柞水县| 汉中市| 石屏县| 尼玛县| 札达县| 南汇区| 隆安县| 耒阳市| 商河县| 晋江市| 开原市| 云南省| 贡嘎县| 桐城市| 唐山市| 镇安县| 河津市| 黄平县| 棋牌| 仁怀市| 阜平县| 明溪县| 剑阁县| 长阳| 玉屏| 襄樊市| 邹城市| 洪江市|