今天MyEclipse10.6出了點問題,所以重裝了它,同一時候也把svn的插件重裝了一次,把網上資源和自己的經歷順便在博客這里記錄一下。建議直接看方法一好了,簡單方便,不必要折騰太多。
下來
方法一:直接解壓法
下載地址:http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240
下載SVN插件:site-1.8.22.zip
解壓后將其所有文件拷貝至:D:\MyEclipse\MyEclipse 10.6\dropins(MyEclipse的安裝文件夾)
重新啟動MyEclipse就可以出現SVN!
(補充說明一下,把下載到svn插件里面的文件(含有features等文件)copy到上面舉樣例的文件夾,重新啟動MyEclipse后能在import項目那里看到例如以下類似例如以下圖的“SVN”。呵呵,那就恭喜你,你安裝插件成功了)

方法二:link安裝
安裝subclipse, MyEclipse9.0 SVN插件
1、從官網下載site-1.6.10.zip文件,網址是:subclipse.tigris.org,
2、從中解壓出features與 plugins目錄,拷貝到E:\MyEclipse\myPlugin\svn里面,其他的*.xml文件不要。
3、在 E:\MyEclipse\MyEclipse9.0\dropins下新建文件svn.link,內容是:path=E:\\MyEclipse \\myPlugin\\svn保存。
4、(嘜呆兒:這一步不確定,先不要刪除)刪除E:\MyEclipse\MyEclipse8.5\configuration \org.eclipse.update目錄
5、重新啟動myeclipse就一切正常了。
[/size]
以上兩種方法都嘗試成功
方法三:在線安裝
1.打開HELP->MyEclipse Configuration
Center。切換到SoftWare標簽頁。
2.點擊Add Site 打開對話框。在對話框Name輸入Svn。URL中輸入:http://subclipse.tigris.org/update_1.6.x
3.在左邊欄中找到Personal Site中找到SVN展開。將Core SVNKit Library和Optional JNA
Library加入(右鍵Add to Profile),Subclipse以下的Subclipse Integration for Mylyn
3.0能夠不加入(特別注意,此處不要加入)。
4.在右下角窗格(Pending Changes )中點擊Apply。安裝重新啟動后MyEclipse就可以。
方法四:肯定可行的方法
1、下載最新的SVN包:
http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240
2、在你的磁盤上任何位置創建目錄:“myplugins/svn”。名字能夠任取。為了方便插件管理。建議名稱為“myplugins”。
3、將解壓的svn里的兩個目錄復制到“myplugins/svn”下。
4、復制下列java代碼,改動路徑並運行:
package app;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* MyEclipse9 插件配置代碼生成器
*
*
*/
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);
}
}
這里須要注意的是改動成為剛才svn所在路徑。建議改為絕對路徑。
比方d:/myplugins/svn/。
。。
5、 找到“$myeclipse_home/configuration /org.eclipse.equinox.simpleconfigurator/”,打開當中的“bundles.inf”文件,為了防止分不清是不 是我們自己后加的東西,在最后面多回幾次車,然后粘貼第4步執行后的代碼,保存
6、重新啟動myeclipse
親測方法一多次,屢試成功。祝團隊協作開發愉快!