2014-06-23 99 views
1

感謝this question,我盯着Wuff來幫助Gradle構建(轉換Eclipse插件)。 這可能是一個新手問題,所以我提前道歉,但我無法在任何地方找到答案:使用Wuff(Gradle插件)構建Eclipse插件

我們目前正在使用Eclipse 4.3.1。於是,我跟着wiki page和改變的版本:

wuff{ 
    selectedEclipseVersion = '4.3.1' 
    eclipseVersion('4.3.1') { 
} 
} 

這似乎工作。但是,默認的鏡像站點不再包含該版本,所以我是一個fileNotFoundException錯誤(對於eclipse-SDK-4.3.1-linux-gtk-x86_64.tar.gz)。

現在,我猜它應該自動進入存檔站點,但由於某種原因,它不會。 我試圖與eclipseMirror擴展擺弄周圍(因爲改變額外的屬性現在被禁用搖籃):

wuff.ext.'eclipseMirror' = 'http://archive.eclipse.org' 

,但無濟於事。

任何有識之士將不勝感激。

+0

我剛剛找到[這裏](https://github.com/akhikhl/wuff/blob/master/libs/wuff-plugin/src/main/resources/org/akhikhl /wuff/defaultConfig.groovy),所以我想我會沒事的,但是我會保留這個問題以供其他人在需要時使用。 – r02

+0

'wuff.ext.eclipseMirror'仍然設置一個額外的屬性。也許你想'wuff.eclipseMirror'。另外,更改額外的屬性不會被禁用。發生的事情是,動態屬性被刪除,有利於額外的屬性。 –

回答

1

使用相同的版本名稱只是覆蓋退出的屬性,它不會刪除其餘部分,這是問題所在(感謝Andrey Hihlovskiy指出它!)。我寫了下面的解決方法:

selectedEclipseVersion = '4.3.1-mine' 
... 
eclipseVersion('4.3.1-mine'){ 
extendsFrom '4.2.2' 
eclipseMavenGroup = 'eclipse-kepler-sr1' 
eclipseMirror = 'http://mirror.netcologne.de' 
eclipseArchiveMirror = 'http://archive.eclipse.org' 
def suffix_os = [ 'linux': 'linux-gtk', 'macosx': 'macosx-cocoa', 'windows': 'win32' ] 
def suffix_arch = [ 'x86_32': '', 'x86_64': '-x86_64' ] 
def fileExt_os = [ 'linux': 'tar.gz', 'macosx': 'tar.gz', 'windows': 'zip' ] 

def current_os = //your os 
def current_arch = //your arch 

sources { 
    source "$eclipseMirror/eclipse//technology/epp/downloads/release/kepler/SR1/eclipse-jee-kepler-SR1-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}" 
    source "$eclipseMirror/eclipse//technology/epp/downloads/release/kepler/SR1/eclipse-rcp-kepler-SR1-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}", sourcesOnly: true 
    languagePackTemplate '${eclipseMirror}/eclipse//technology/babel/babel_language_packs/R0.11.1/kepler/BabelLanguagePack-eclipse-${language}_4.3.0.v20131123020001.zip' 
}