4 Replies Latest reply on Mar 19, 2010 4:04 AM by kenfrommera

    Problem creating local mirror of JBoss Tools for 3.1 final

      Hello,

       

      We have local mirror of JBoss Tools in order to 1) avoid access to remote update site when many developers need to update Eclipse plug-ins, 2) have only needed plug-ins to make install/update process easier for newcomers and 3) reduce load on JBoss update site

       

      Previously I used the following script to update development milestones of JBoss Tools 3.1 on our local mirror:

      for %%i in (
          org.jboss.tools.richfaces.feature
          org.jboss.tools.seam.feature
          org.jboss.tools.jmx.feature
          org.jboss.ide.eclipse.as.feature
          org.jboss.ide.eclipse.archives.feature
          org.hibernate.eclipse.feature
          org.drools.eclipse.feature
          org.drools.eclipse.task.feature
          org.guvnor.tools.feature
          org.jboss.tools.bpel.feature
          org.jboss.tools.xulrunner.feature
          org.jboss.tools.jbpm.convert.feature
          org.jbpm.gd.jpdl.feature
          org.jboss.tools.jbpm4.feature
          org.jboss.tools.flow.common.feature
          org.jboss.tools.flow.jpdl4.feature
          org.jboss.tools.jbpm.common.feature
      ) do (
          call :syncf "http://download.jboss.org/jbosstools/updates/development/" %%i
      )


      exit


      :sync
      eclipse\eclipsec.exe -application org.eclipse.update.core.standaloneUpdate -command mirror -from %* -to site -noSplash -vmargs -Dhttp.proxyHost=%PROXY_HOST% -Dhttp.proxyPort=%PROXY_PORT%
      exit /b


      :syncf
      call :sync %1 -featureId %2

      exit /b

       

      I was very happy when JBoss Tools for 3.1 final have been released and was eager to update our local mirror but failed.

      Seems that the problem occurred because some feature disappeared from the http://download.jboss.org/jbosstools/updates/JBossTools-3.1.0.GA/site.xml

       

      Namely jBPM tools:

      org.jboss.tools.jbpm.common.feature

      org.jboss.tools.flow.common.feature

      org.jboss.tools.bpel.feature

      org.jboss.tools.flow.jpdl4.feature

      org.jboss.tools.jbpm4.feature

      org.jbpm.gd.jpdl.feature

       

      At the same time I can easily install these features by pointing Eclipse at http://download.jboss.org/jbosstools/updates/JBossTools-3.1.0.GA

      Can anyone help in resolving my problem?

        • 1. Re: Problem creating local mirror of JBoss Tools for 3.1 final
          dgolovin

          As I remember p2 update doesn't use site.xml anymore. It is only required during build to define categories and relations between categories and features. I suppose you need to look into content.jar and locate in content.xm all units with


          provides/provided@namespace=org.eclipse.equinox.p2.eclipse.type

          provides/provided@name=feature

           

          and then if you found unit with attributes values provided above use node

           

          provides/provided

           

          with attribute


          provides/provided@namespace=org.eclipse.update.feature

           

          to extract name of the feature from attribute


          provides/provided@name

           

          like for example for richfaces feature

           

           <unit id='org.jboss.tools.richfaces.feature.feature.jar' version='3.1.0.v201003050540R-H56-GA'>
                <properties size='9'>
                  <property name='org.eclipse.equinox.p2.name' value='%featureName'/>
                  <property name='org.eclipse.equinox.p2.description' value='%description'/>
                  <property name='org.eclipse.equinox.p2.description.url' value='http://www.jboss.org/tools'/>
                  <property name='org.eclipse.equinox.p2.provider' value='%providerName'/>
                  <property name='org.eclipse.update.feature.plugin' value='org.jboss.tools.vpe'/>
                  <property name='df_LT.featureName' value='JBoss Tools RichFaces'/>
                  <property name='df_LT.copyright' value='Copyright (c) 2007 Exadel, Inc and Red Hat, Inc.&#xA;Distributed under license by Red Hat, Inc. All rights reserved.&#xA;This program is made available under the terms of the&#xA;Eclipse Public License v1.0 which accompanies this distribution,&#xA;and is available at http://www.eclipse.org/legal/epl-v10.html&#xA;Contributors:&#xA;Exadel, Inc. and Red Hat, Inc. - initial API and implementation'/>
                  <property name='df_LT.providerName' value='JBoss by Red Hat'/>
                  <property name='df_LT.description' value='Visual editing'/>
                </properties>
                <provides size='3'>
                  <provided namespace='org.eclipse.equinox.p2.iu' name='org.jboss.tools.richfaces.feature.feature.jar' version='3.1.0.v201003050540R-H56-GA'/>
                  <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
                  <provided namespace='org.eclipse.update.feature' name='org.jboss.tools.richfaces.feature' version='3.1.0.v201003050540R-H56-GA'/>
                </provides>
                <filter>
          
          1 of 1 people found this helpful
          • 2. Re: Problem creating local mirror of JBoss Tools for 3.1 final
            nickboldt
            Rather than pulling down pieces of the site, why not grab the whole archive in a single zip, then unpack it (if needed - you don't have to unzip the update site to use it) and use that?   Here's the whole update site in a single download: http://downloads.sourceforge.net/jboss/JBossTools-Update-3.1.0.v201003050540R-H56-GA.zip
            1 of 1 people found this helpful
            • 3. Re: Problem creating local mirror of JBoss Tools for 3.1 final
              dgolovin
              +1 for this option   simple and elegant
              • 4. Re: Problem creating local mirror of JBoss Tools for 3.1 final

                I would prefer mirroring only needed plug-ins, rather than having all JBoss Tools on my update site. It is because we need only few of them for our development environment.

                 

                Nevertheless, thank you for your answers. You gave me all needed information to understand how p2 update sites should be mirrored.

                 

                The following update command with the following ANT build script is used for mirroring at my site now:

                 

                Command:

                eclipsec.exe -application org.eclipse.ant.core.antRunner -noSplash -consoleLog

                 

                ANT build script (build.xml):

                <project name="iPat" basedir="." default="sync">

                <target name="sync">

                <p2.mirror source="http://download.jboss.org/jbosstools/updates/development" destination="file://E:/buildloop/eclipse-updates/site">

                <slicingOptions followStrict="true" />

                <iu id="org.jboss.tools.jbpm.common.feature.feature.group" />

                <iu id="org.jboss.tools.cdi.feature.feature.group" />

                <iu id="org.jboss.tools.flow.common.feature.feature.group" />

                <iu id="org.hibernate.eclipse.feature.feature.group" />

                <iu id="org.jboss.ide.eclipse.archives.feature.feature.group" />

                <iu id="org.jboss.tools.bpel.feature.feature.group" />

                <iu id="org.drools.eclipse.feature.feature.group" />

                <iu id="org.guvnor.tools.feature.feature.group" />

                <iu id="org.drools.eclipse.task.feature.feature.group" />

                <iu id="org.jboss.tools.richfaces.feature.feature.group" />

                <iu id="org.jboss.ide.eclipse.as.feature.feature.group" />

                <iu id="org.jboss.tools.flow.jpdl4.feature.feature.group" />

                <iu id="org.jboss.tools.jbpm4.feature.feature.group" />

                <iu id="org.jboss.tools.jbpm.convert.feature.feature.group" />

                <iu id="org.jbpm.gd.jpdl.feature.feature.group" />

                <iu id="org.jboss.tools.jmx.feature.feature.group" />

                <iu id="org.jboss.tools.seam.feature.feature.group" />

                <iu id="org.jboss.tools.xulrunner.feature.feature.group" />

                </p2.mirror>

                </target>

                </project>

                 

                Thank you for your help!