2014-04-16 4 views
18

मैंने एक्लिप्स लुना 4.4-एम 6 स्थापित किया है। मैंने ग्रहण 4.3 (केप्लर) के लिए Google Plugin स्थापित करने का प्रयास किया, लेकिन ग्रहण मुझे इसे स्थापित करने की अनुमति नहीं देगा।Google प्लगइन?

क्या इसे इंस्टॉल करने के लिए मजबूर करने का कोई तरीका है (उदाहरण के लिए इसे डाउनलोड करके और कुछ मैनिफेस्ट या अन्य संपादित करना)? या 4.3 और 4.4 के बीच परिवर्तन तोड़ने के कारण यह व्यर्थ होगा?

+0

लुना अभी भी विकास में है (एम 6 एक मील का पत्थर है) इसलिए अन्य उत्पादों की अभी तक इसका परीक्षण नहीं होने की संभावना है। –

+1

मैं समझता हूं कि लुना अभी भी विकास में है। मैं सोच रहा था कि प्लगइन को स्थापित करने का कोई तरीका है या नहीं। मैं उस जोखिम को लेने के लिए तैयार हूं। –

+1

लुना आधिकारिक तौर पर अब जारी किया गया है, इसलिए अब हम Google पर इंतजार कर रहे हैं! –

उत्तर

2

यह वहाँ पता चला है ग्रहण लूना में स्थापित करने के लिए केपलर के लिए गूगल प्लगइन अनुमति देने के लिए प्रकट होता है को बदलने के लिए एक तरीका है। योगदानकर्ता Google समूह पर ज़ी क्रिटर ने अपाचे एंटी build.xml फ़ाइल लिखा है जो आवश्यक कार्य करता है, original here और नीचे पुन: प्रस्तुत किया गया है।

यह मेरे लिए खूबसूरती से काम करता है। मैंने सफलतापूर्वक इस स्क्रिप्ट को चलाया है और प्लगइन को लुना में स्थापित किया है, और - कम से कम जीडब्ल्यूटी के लिए - ऐसा लगता है कि यह सामान्य रूप से काम करता है।

Google समूह पर discussion thread के अनुसार मेवेन प्लगइन के साथ कुछ असंगतताएं हैं (मैं व्यक्तिगत रूप से मेवेन का उपयोग नहीं करता) और एक नई और उपयुक्त रूप से अच्छी तरह से परीक्षण की गई Google प्लगइन जल्द ही (जुलाई 2014 के अंत में) बाहर आ जाएगी।

<?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=&quot;\[3.8.0,3.10.0\)&quot;(.*)" 
      replacementPattern="\1\2" 
      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="${artifacts.jar}" dest="${project.temp.dir}"/> 
     <replaceregexp byline="true"> 
      <regexp pattern="${original.md5}"/> 
      <substitution expression="${updated.md5}"/> 
      <fileset dir="${project.temp.dir}"/> 
     </replaceregexp> 
     <zip destfile="${artifacts.jar}" basedir="${project.temp.dir}"/> 
    </target> 

    <target depends="update.artifacts" name="update.content"> 
     <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> 

मैं शब्दों ग्रहण मंगल ग्रह यहाँ जोड़ देंगे, तो यह समाधान खोज रहा है और संभवतः ग्रहण के जून 2015 जारी करने के लिए अनुकूलित करके पाया जा सकता।

+1

जीपीई 3.7.0 का आधिकारिक संस्करण अब लाइव है: [https://dl.google.com/eclipse/plugin/4.4 ](https://dl.google.com/eclipse/plugin/4.4) (ग्रहण लुना) –

7

ग्रहण समुदाय मंच के लिए Google प्लगइन के अनुसार, हम मध्य जुलाई तक लुना समर्थन के साथ एक नई प्लगइन की उम्मीद कर सकते हैं।

https://groups.google.com/forum/#!topic/google-plugin-eclipse/4YACQROrB2U

+0

इस समूह को इंगित करने के लिए धन्यवाद। मैंने उस चर्चा थ्रेड में दिए गए निर्देशों का उपयोग करके लुना में केप्लर प्लगइन स्थापित करने में कामयाब रहा है। मैंने आपको ऊपर उठाया है, लेकिन मेरे उत्तर को स्वीकार किए गए उत्तर के रूप में चिह्नित किया है क्योंकि यह उस समस्या को हल करने का एक तरीका प्रदान करता है जिसमें प्रतीक्षा शामिल नहीं है ... :-) –

+0

अंत में यह आ गया है! –

2

ऐसा हाल ही में हल किया गया प्रतीत होता है।

मैं इस लेखन के रूप में बाज़ार में प्लगइन नहीं मिला है, लेकिन वहाँ एक अद्यतन साइट है: https://dl.google.com/eclipse/plugin/4.4

आप इस बारे में और अधिक पढ़ सकते हैं https://developers.google.com/eclipse/docs/install-eclipse-4.4

+0

हां, मैंने वास्तव में उपरोक्त मेरे उत्तर के तहत उस प्रभाव को एक टिप्पणी जोड़ा, लेकिन यह एक पूर्ण उत्तर के रूप में है और सिर्फ एक टिप्पणी नहीं है। धन्यवाद। –

संबंधित मुद्दे