Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Is there an easy way to install plugins?(Find a way to install all plugins for a specific eclipse version )
Is there an easy way to install plugins? [message #1861512] Tue, 17 October 2023 06:46 Go to next message
Mikael Petterson is currently offline Mikael PettersonFriend
Messages: 158
Registered: July 2009
Senior Member
Hi,

We have used a feature.xml and added our plugins to be shared for all eclipse users.

We have not updated it for a while so now when we were supposed to upgrade all plugins.
I created a feature project and then generated a p2 site as a zip with all the plugins.
All good and I thought it was simple :-) Yeah right!

I tried to install, using org.eclipse.equinox.p2.director, in a fresh 4.29 Eclipse and immediately got the following:

Cannot complete the install because one or more required items could not be found.
Software being installed: Common Preference for Y 4.4.0.202310111606 (com.x.commonpref.y.feature.group 4.4.0.202310111606)
Missing requirement: Eclipse Checkstyle UI 10.10.0.202309290924 (net.sf.eclipsecs.ui 10.10.0.202309290924) requires 'java.package; org.apache.commons.lang3 3.12.0' but it could not be found
Cannot satisfy dependency:
From: Common Preference for Y 4.4.0.202310111606 (com.x.commonpref.y.feature.group 4.4.0.202310111606)
To: org.eclipse.equinox.p2.iu; net.sf.eclipsecs.ui [10.10.0.202309290924,10.10.0.202309290924]

Ah so I reverted configuration to get all the installed plugins again. Added the missing org.apache.commons.lang3 dependency. And thought this was pice of cake.

No no same error message but a different library .... and so it goes on. And if we need to do the same thing each time we upgrade Eclipse version it will be too much and we stop doing upgrades.

So my question about this:

Is there a way to find all dependencies needed for a feature so it can be added to the feature file before using p2 director? Or even make p2 director list all dependencies would be ok.

Second question is:

I found that there is a File --> Export --> Installed Software Items to File.

So this means I only have to take a "clean" eclipse and install all plugins and then export.
And magic I have file with all the plugins I wanted to export. Super nice!

And then use the reverse with Import.

<?xml version='1.0' encoding='UTF-8'?>
<?p2f version='1.0.0'?>
<p2f version='1.0.0'>
  <ius size='19'>
    <iu id='org.eclipse.eclemma.feature.feature.group' name='EclEmma Java Code Coverage' version='3.1.7.202306070845'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/eclemma/releases/'/>
      </repositories>
    </iu>
    <iu id='net.sf.eclipsecs.feature.group' name='Eclipse Checkstyle Plug-in' version='10.10.0.202309291129'>
      <repositories size='1'>
        <repository location='https://checkstyle.org/eclipse-cs-update-site'/>
      </repositories>
    </iu>
    <iu id='com.ericsson.eecs.shared.sdk.ide' name='Ericsson EECS Eclipse SDK' version='4.29.0.202309151353'>
      <repositories size='0'/>
    </iu>
    <iu id='org.eclipse.egit.feature.group' name='Git integration for Eclipse' version='6.7.0.202309050840-r'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/egit/updates'/>
      </repositories>
    </iu>
    <iu id='org.eclipse.jgit.feature.group' name='Java implementation of Git' version='6.7.0.202309050840-r'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/egit/updates'/>
      </repositories>
    </iu>
    <iu id='org.eclipse.jgit.gpg.bc.feature.group' name='Java implementation of Git - GPG support using BouncyCastle' version='6.7.0.202309050840-r'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/egit/updates'/>
      </repositories>
    </iu>
    <iu id='org.eclipse.jgit.ssh.apache.feature.group' name='Java implementation of Git - ssh support using Apache MINA sshd' version='6.7.0.202309050840-r'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/egit/updates'/>
      </repositories>
    </iu>
    <iu id='se.ericsson.jcat.jcat_eclipse_feature.feature.group' name='JCAT Eclipse Report Viewer (JERV)' version='1.1.11'>
      <repositories size='0'/>
    </iu>
    <iu id='org.eclipse.m2e.sdk.feature.feature.group' name='M2E - Complete Development Kit' version='2.4.0.20230827-1557'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/technology/m2e/releases/latest'/>
      </repositories>
    </iu>
    <iu id='org.eclipse.m2e.feature.feature.group' name='M2E - Maven Integration for Eclipse' version='2.4.100.20230827-1557'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/technology/m2e/releases/latest'/>
      </repositories>
    </iu>
    <iu id='org.eclipse.m2e.pde.feature.feature.group' name='M2E - PDE Integration' version='2.2.200.20230820-0922'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/technology/m2e/releases/latest'/>
      </repositories>
    </iu>
    <iu id='org.eclipse.m2e.logback.feature.feature.group' name='M2E - SLF4J over Logback Logging' version='2.2.0.20230819-1220'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/technology/m2e/releases/latest'/>
      </repositories>
    </iu>
    <iu id='org.eclipse.epp.mpc.feature.group' name='Marketplace Client' version='1.10.1.v20221110-1841'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/wildwebdeveloper/releases/1.3.0/'/>
      </repositories>
    </iu>
    <iu id='org.eclipse.m2e.maven.runtime.38.iu' name='Maven 3.8.x' version='1.0.0'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/technology/m2e/releases/latest'/>
      </repositories>
    </iu>
    <iu id='org.eclipse.m2e.maven.runtime.39.iu' name='Maven 3.9.x' version='1.0.0'>
      <repositories size='1'>
        <repository location='https://download.eclipse.org/technology/m2e/releases/latest'/>
      </repositories>
    </iu>
    <iu id='org.sonarlint.eclipse.feature.feature.group' name='SonarLint for Eclipse' version='8.1.0.80220'>
      <repositories size='1'>
        <repository location='https://eclipse-uc.sonarlint.org'/>
      </repositories>
    </iu>
    <iu id='com.github.spotbugs.plugin.eclipse.feature.group' name='SpotBugs' version='4.8.0.r202310120137-b8c498c'>
      <repositories size='1'>
        <repository location='https://spotbugs.github.io/eclipse/'/>
      </repositories>
    </iu>
    <iu id='org.testng.eclipse.feature.group' name='TestNG' version='7.8.0.202308061717'>
      <repositories size='1'>
        <repository location='https://testng.org/testng-eclipse-update-site'/>
      </repositories>
    </iu>
    <iu id='org.testng.eclipse.maven.feature.feature.group' name='TestNG M2E (Maven) Integration (Optional)' version='7.8.0.202308061717'>
      <repositories size='1'>
        <repository location='https://testng.org/testng-eclipse-update-site'/>
      </repositories>
    </iu>
  </ius>
</p2f>


This is a very nice feature and easy to use but I have not found a way to use eclipse in headless mode to do the import. Is it possible? Any hints?

All hints welcome!

br,

//mike





Re: Is there an easy way to install plugins? [message #1861544 is a reply to message #1861512] Wed, 18 October 2023 07:21 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33224
Registered: July 2009
Senior Member
It think the only good way to create a self-contained update site is to use Tycho to build it where you can use this flag:

https://tycho.eclipseprojects.io/doc/latest/tycho-p2-repository-plugin/assemble-maven-repository-mojo.html#includeTransitiveDependencies

I don't think there is a headless way to import such a file.

You might consider using Oomph to automate the setup of the environment:

https://wiki.eclipse.org/Eclipse_Oomph_Authoring

Then folks can set things up more easily like this:

https://github.com/eclipse-platform/.github/blob/main/CONTRIBUTING.md#creating-an-eclipse-development-environment


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Suppress default behaviour of IApplication exit codes 23 and 24?
Next Topic:requires org.eclipse.equinox.p2.iu
Goto Forum:
  


Current Time: Wed Oct 09 18:46:15 GMT 2024

Powered by FUDForum. Page generated in 0.05289 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top