原来有 是 一种方法来改变体现,让谷歌插件开普勒在Eclipse月神安装。Google网上论坛的撰稿人 Ze Kritter 编写了一个Apache
Ant
build.xml文件,该文件执行了必要的工作,该文件在此原始并在下面复制。
它对我来说效果很好。我已经成功运行了该脚本并将插件安装到Luna中,并且-至少对于GWT-似乎可以正常工作。
根据Google网上论坛的讨论线程,Maven插件存在一些不兼容(我个人不使用Maven),并且不久之后(2014年7月下旬)将推出一个经过适当测试的新Google插件。
<?xml version="1.0" encoding="UTF-8"?><project name="gpe.4.luna" basedir="." default="update.end"> <property environment="env"/> <property name="project.base.dir" value="."/> <property name="project.temp.dir" value="${project.base.dir}/temp"/> <property name="project.plugin.dir" value="${project.base.dir}/plugin"/> <property name="project.plugins.dir" value="${project.plugin.dir}/plugins"/> <property name="e42.plugin.jar" value="${project.plugins.dir}/com.google.gdt.eclipse.platform.e42_3.6.0.v201406262229-rel-r43.jar"/> <property name="artifacts.jar" value="${project.plugin.dir}/artifacts.jar"/> <property name="content.jar" value="${project.plugin.dir}/content.jar"/> <property name="plugin43.zip" value="com.google.gdt.eclipse.suite.4.3.update.site_3.6.0.zip"/> <property name="plugin44.zip" value="com.google.gdt.eclipse.suite.4.4.update.site_3.6.0.zip"/> <!-- source: http://stackoverflow.com/a/5340557/3747097 Loads entries from a manifest file. @jar The jar from where to read @file A manifest file to read @prefix A prefix to prepend @section The name of the manifest section to load --> <scriptdef name="loadManifest" language="javascript" loaderRef="sharedbuild-loaderRef"> <attribute name="jar" /> <attribute name="file" /> <attribute name="prefix" /> <attribute name="section" /> <![CDATA[ var jarname = attributes.get("jar"); var filename = attributes.get("file"); if (jarname != null && filename != null) { self.fail("only one of jar or file is required"); } var prefix = attributes.get("prefix"); if (prefix == null) { prefix = ""; } var section = attributes.get("section"); var manifest; if (jarname != null) { var jarfile = new java.util.jar.JarFile(new java.io.File(jarname)); manifest = jarfile.getManifest(); } else if (filename != null) { manifest = new java.util.jar.Manifest(new java.io.FileInputStream(new java.io.File(filename))); } else { self.fail("One of jar or file is required"); } if (manifest == null) { self.log("No manifest in " + jar); } else { var attributes = (section == null) ? manifest.getMainAttributes() : manifest.getAttributes(section); if (attributes != null) { var iter = attributes.entrySet().iterator(); while (iter.hasNext()) { var entry = iter.next(); // self.log("key " + entry.getKey()); // self.log("value " + entry.getValue()); project.setProperty(prefix + entry.getKey(), entry.getValue()); } } } ]]> </scriptdef> <!-- source: http://giorgio-ferrara.blogspot.ru/2010/09/apache-ant-how-to-search-and-replace.html --> <macrodef name="replaceStringWithRegExp"> <attribute name="string"/> <attribute name="searchPattern"/> <attribute name="replacementPattern"/> <attribute name="property"/> <sequential> <tokens id="id"> <concat> <string value="@{string}"/> <filterchain> <tokenfilter> <replaceregex pattern="@{searchPattern}" replace="@{replacementPattern}" flags="g"/> </tokenfilter> </filterchain> </concat> </tokens> <property name="@{property}" value="${toString:id}"/> </sequential> </macrodef> <target name="clean"> <delete dir="${project.temp.dir}"/> <delete dir="${project.plugin.dir}"/> <delete file="${plugin44.zip}"/> </target> <target depends="clean" name="init"> <mkdir dir="${project.temp.dir}"/> </target> <target depends="init" name="check.source"> <condition property="plugin-not-found"> <not> <available file="${plugin43.zip}"/> </not> </condition> </target> <target depends="check.source" name="get.source" if="${plugin-not-found}"> <get src="https://commondatastorage.googleapis.com/eclipse_toolreleases/products/gpe/release/3.6.0/4.3/com.google.gdt.eclipse.suite.4.3.update.site_3.6.0.zip" dest="."/> </target> <target depends="check.source, get.source" name="unzip.source"> <unzip src="${plugin43.zip}" dest="${project.plugin.dir}"/> </target> <target depends="unzip.source" name="update.manifest"> <checksum file="${e42.plugin.jar}" property="original.md5"/> <loadManifest jar="${e42.plugin.jar}" prefix="e42.mf."/> <replaceStringWithRegExp string="${e42.mf.Require-Bundle}" searchPattern="(.*);bundle-version="[3.8.0,3.10.0)"(.*)" replacementPattern="12" property="Require-Bundle"/> <!-- <echo>${e42.mf.Require-Bundle}</echo> <echo>${Require-Bundle}</echo> --> <jar update="true" file="${e42.plugin.jar}"> <manifest> <attribute name="Require-Bundle" value="${Require-Bundle}"/> </manifest> </jar> <checksum file="${e42.plugin.jar}" property="updated.md5"/> <!-- <echo>${original.md5}</echo> <echo>${updated.md5}</echo> --> </target> <target depends="update.manifest" name="update.artifacts"> <delete includeemptydirs="true"> <fileset dir="${project.temp.dir}" includes="***"/> </delete> <unzip src="${content.jar}" dest="${project.temp.dir}"/> <replaceregexp byline="true"> <regexp pattern="name='org.eclipse.core.runtime' range='[3.8.0,3.10.0)'"/> <substitution expression="name='org.eclipse.core.runtime' range='0.0.0'"/> <fileset dir="${project.temp.dir}"/> </replaceregexp> <zip destfile="${content.jar}" basedir="${project.temp.dir}"/> </target> <target depends="update.content" name="create.updated.plugin"> <zip destfile="${plugin44.zip}" basedir="${project.plugin.dir}"/> <delete dir="${project.temp.dir}"/> <delete dir="${project.plugin.dir}"/> </target> <target depends="create.updated.plugin" name="update.end"> <echo message="plugin rebuild success"/> </target></project>
我将在此处添加“ Eclipse Mars ”一词,以便可以通过搜索找到该解决方案,并有可能将其改编为2015年6月发行的Eclipse。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)