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

Resin Pro 3.1.2 Plugin for IntelliJ IDEA

Posted on 2007-09-18 11:04 在路上... 阅读(1769) 评论(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

只有注册用户登录后才能发表评论。


网站导航: