【问题标题】:Using Wuff (Gradle Plugin) to Build Eclipse Plugins使用 Wuff(Gradle 插件)构建 Eclipse 插件
【发布时间】:2014-06-23 12:01:16
【问题描述】:

感谢this question,我盯着 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 扩展(因为 Gradle 现在禁用了更改额外属性):

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

但无济于事。

任何见解将不胜感激。

【问题讨论】:

  • 我刚刚找到this,所以我想我会没事的,但如果需要,我会保留这个问题供其他人使用。
  • wuff.ext.eclipseMirror 仍在设置额外的属性。也许你想要wuff.eclipseMirror。此外,不会禁用更改额外属性。发生的情况是动态属性被删除以支持额外的属性。

标签: eclipse gradle build.gradle


【解决方案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'
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-18
    • 2013-12-12
    • 1970-01-01
    • 1970-01-01
    • 2014-12-09
    相关资源
    最近更新 更多