myeclipse安装手动安装SVN插件的四种方法汇总

今天弄了一下午myeclipse安装手动安装SVN插件。

尝试了好几种方式都不对,最后终于用方法四弄好了。

分享给大家,相信以下几种方式总有一种适合你。

我的myeclipse版本是8.5,下载的插件版本是site-1.6.18.zip的。


方法一、如果可以上网可在线安装
1.打开Myeclipse,在菜单栏中选择Help→SoftwareUpdates→FindandInstall;
2.选择Searchfornewfeaturestoinstall,点击Next进入下一步;
3.点击"NewRemoteSite"按钮,在弹出的对话框中输入:
name:SVN
url:http://subclipse.tigris.org/update_1.4.x
点击OK,关闭对话框,并点击Finish按钮,Myeclipse自动下载插件安装程序;
4.下载完插件之后,进入安装画面。
5.选择所要安装的SVN插件内容,这里去掉第二个选项SubclipseIntegrations,点击下一步;
6.选择"Iacceptthetermsinthelicenseagreements"并点击Next,直到点击Finish即可,进入下一步。
7.开始安装SVN插件,安装完成之后,重启Myeclipse。



方法二、无法连接到myeclipse插件更新中心的情况
1、下载SVN插件
下载地址:http://subclipse.tigris.org/files/documents/906/46495/site-1.6.5.zip
2.在MyEclipse的安装路径下的plug_in(C:\ProgramFiles\MyEclipse\eclipse\plugins)下新建文件夹:site-1.6.5;
3.打开MyEclipse,在菜单栏中选择Help→SoftwareUpdates→FindandInstall;
2.选择Searchfornewfeaturestoinstall,点击Next进入下一步;
3.点击"NewLocalSite"按钮,找到解压出来的文件夹(site-1.6.5)→点击OK,并点击Finish按钮,Myeclipse自动加载插件;
4.在弹出的菜单中,selectthefeaturestoinsteall:在刚加进去的路径Subclipse-site-1.6.5这一项前打钩,此时会报错,然后展开Subclipse前的加号,去掉SubclipseIntegrationforMylyn3.x(Optional)3.0.0前的钩,错误消失→next→选Iacceptthetermsinthelicenseagreements→next→next→选中所有的8项,然后ChangeLocation……,在弹出的菜单中选AddLocation……选择在第3步中建的文件夹的路径(C:\ProgramFiles\MyEclipse\eclipse\plugins\site-1.6.5)→Finish→再弹出的菜单中选InstallAll→Yes
5.开始安装SVN插件,安装完成之后,重启Myeclipse。


方法三、手动添加,通过link链接

1、从官网下载Site-1.6.5.zip

2、解压Site-1.6.5.zip至${eclipse}\Plugins\Subclipse-1.6.5.zip,并删除site.xml(很重要)(即把Site-1.6.5.zip解压出来的features和plugins文件夹里所有的jar包和两个XML文件artifacts.xml、content.xml添加并替换到plugins文件夹下。例如:我应添加在C:\ProgramFiles\MyEclipse\eclipse\plugins\目录下)

3、创建link文件${eclipse}\linksSubclipse-1.6.5.zip.link(即在link文件夹下添加linksSubclipse-1.6.5.link文件)其内容为:path=C:\ProgramFiles\MyEclipse\eclipse\

4、重启Eclipse就是把subclipse集成完毕。


方法四、采用在bundles.info文件写入配置信息的方式安装插件

1、下载最新的SVN包

 

2、 然后你可以在myeclipse下建立一个文件夹myplugin来存放你需要安装的插件,将你需要安装的插件放到这个目录下。(存放 svn 解压文件 )

3、复制下列java代码,修改路径并执行:

package app;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
 * MyEclipse 插件配置代码生成器
 *
 *
 */
public class PluginConfigCreator
{
    public PluginConfigCreator()
    {
    }
    public void print(String path)
    {
        List<String> list = getFileList(path);
        if (list == null)
        {
            return;
        }
        int length = list.size();
        for (int i = 0; i < length; i++)
        {
            String result = "";
            String thePath = getFormatPath(getString(list.get(i)));
            File file = new File(thePath);
            if (file.isDirectory())
            {
                String fileName = file.getName();
                if (fileName.indexOf("_") < 0)
                {
                    print(thePath);
                    continue;
                }
                String[] filenames = fileName.split("_");
                String filename1 = filenames[0];
                String filename2 = filenames[1];
                result = filename1 + "," + filename2 + ",file:/" + path + "/"
                        + fileName + "\\,4,false";
                System.out.println(result);
            } else if (file.isFile())
            {
                String fileName = file.getName();
                if (fileName.indexOf("_") < 0)
                {
                    continue;
                }
                int last = fileName.lastIndexOf("_");// 最后一个下划线的位置
                String filename1 = fileName.substring(0, last);
                String filename2 = fileName.substring(last + 1, fileName
                        .length() - 4);
                result = filename1 + "," + filename2 + ",file:/" + path + "/"
                        + fileName + ",4,false";
                System.out.println(result);
            }
        }
    }
    public List<String> getFileList(String path)
    {
        path = getFormatPath(path);
        path = path + "/";
        File filePath = new File(path);
        if (!filePath.isDirectory())
        {
            return null;
        }
        String[] filelist = filePath.list();
        List<String> filelistFilter = new ArrayList<String>();
        for (int i = 0; i < filelist.length; i++)
        {
            String tempfilename = getFormatPath(path + filelist[i]);
            filelistFilter.add(tempfilename);
        }
        return filelistFilter;
    }
    public String getString(Object object)
    {
        if (object == null)
        {
            return "";
        }
        return String.valueOf(object);
    }
    public String getFormatPath(String path)
    {
        path = path.replaceAll("\\\\", "/");
        path = path.replaceAll("//", "/");
        return path;
    }
    public static void main(String[] args)
    {
        /*你的插件的安装目录*/
            String plugin = "改成安装目录\\Genuitec\\svn";
        new PluginConfigCreator().print(plugin);
    }
}

 

 

 

用windows的朋友只需要设置你们的绝对路径就可以了,比如d:/myplugins/svn/。。。

 

 

4、找到“$myeclipse_home/configuration/org.eclipse.equinox.simpleconfigurator/”,打开其中的“bundles.inf “文件(最好先备份以下) ,然后粘贴第3步运行后的代码,保存在 bundles.inf 文件中

5、重启myeclipse

6、show 插件 - svn就能看到了





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值