Download Eclipse plugin update sites for offline installation

The plugin I want to install provides an update site for installation. However, the Eclipse installation that I want to install is on a machine that is not connected to the Internet. Is there a way to access the site (HTTP, FTP, etc.) to upload files to it for offline installation?

+62
eclipse plugins installation
Sep 03 '09 at 2:39
source share
7 answers

Eclipse offers a way to mirror these sites automatically, either through the command line or through ant tasks.

Mirror based on p2 information

$eclipse_home/eclipse -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source $1 -destination $2 $eclipse_home/eclipse -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source $1 -destination $2 

Link: Equinox p2 repository mirroring

Mirror based on .xml site information

 java -jar $eclipse_home/plugins/org.eclipse.equinox.launcher_*.jar -application org.eclipse.update.core.standaloneUpdate -command mirror -from $from -to $to 

Link: Starting the update manager from the command line

You can follow the evolution of these scripts in my script repository .

+50
Dec 15 '09 at 13:06
source share

Most Eclipse plug-ins can be installed without updating Eclipse by copying the required JAR files available on the update site to the Eclipse plugin and function directory.

In some cases, you need to start Eclipse using the -clean switch.

Here is an example of how to do this for the m2eclipse plugin:

  • The m2eclipse update site is http://m2eclipse.sonatype.org/update . Identifying the list of required JARs is the first step. This is usually found in the site.xml file; in this case you will find it at http://m2eclipse.sonatype.org/update/site.xml .
  • Filter the list of JARs that will be loaded into the version of the plugin that you intend to use. This can be determined by the version attribute for each "function". If you're lucky, you'll find a description of the JAR in the node category.
  • Note the url attribute of each JAR to be loaded. This will include a subdirectory on the server where the JAR is available, as well as a directory in the Eclipse installation where they should be located.

PS: This method is a bit hacky, but it is based on a link to the site . But refer to the update

Update

I have not tried to do this, but you can create a local mirror site from where everyone else can download Eclipse plugins. In Galileo, this can be done by running Eclipse updater offline using the mirror command .

+8
Sep 03 '09 at 2:43
source share

After some time struggling with mirroring, I realized that it is much easier (at least for me) to use "wget" instead.

In short:

  • Download site:

    wget --recursive --no-parent http://url.of/updatesite

  • Download the contents of the downloaded update site and move it to an offline environment.

  • Add the offline update catalog directory to the list of available software sites using the "Local ..." button.

You can read more about this here .

+8
Jan 26 '15 at 11:21
source share

You can mirror p2 sites using Ant tasks:

 <target name="springide"> <echo>springide</echo> <p2.mirror verbose="true"> <repository location="${REPO_HOME}/springide" name="springide" append="true"/> <source> <repository location="http://springide.org/updatesite" /> </source> <iu id="Core / Spring IDE" version="" /> <iu id="Extensions / Spring IDE" version="" /> <iu id="Integrations / Spring IDE" version="" /> <iu id="Resources / Spring IDE" version="" /> </p2.mirror> </target> 

or findbugs:

 <target name="findbugs"> <echo>findbugs</echo> <p2.mirror verbose="true"> <repository location="${REPO_HOME}/findbugs" name="findbugs" append="true"/> <source> <repository location="http://findbugs.cs.umd.edu/eclipse/" /> </source> <iu id="edu.umd.cs.findbugs.plugin.eclipse.feature.group" version="" /> </p2.mirror> </target> 

For this to work, you need to run Ant tasks in the same JVM as eclipse.

You can find the IUs: by opening "Software Updates" and copying them there. In Eclipse 3.5 there should be a More ... button, in 3.4 you need to click the properties button.

+4
03 Sep '09 at 15:29
source share

I found that p2 mirrorApplication does not work very well on some sites and mirror duplicated artifacts (both pack200 and jar versions). The b3 aggregator worked much better and simplified the setup of my update site. See the Guide at https://wiki.eclipse.org/Eclipse_b3/aggregator/manual for installation instructions and details.

The main steps that I used were:

  • File> New> Other ...> b3> Repository Aggregation.
  • Select Aggregate node and install Build Root in the folder where you want to execute the aggregated repo.
  • Add the platforms you need using the R-click Aggregation node> New Child> Configuration.
  • Add one test set , usually setting its label on the main one.
  • If you do not need additional packages from the main eclipse repository (for example: http://download.eclipse.org/releases/mars ), you can add it to the Validation Set as a Validation Repository , but usually you need to add it as a Mapped Repository in Contribution therefore, you can load dependencies and / or additional eclipse functions.
  • For each plugin, add a Contribution with a label and under that at least one Mapped repository with a location.
  • Add Custom Category Nodes to Aggregation if you want; Give them each unique description, identifier and label.
  • Expand the Node Storage Browser at the bottom> expand uro repo> expand Installable Units > Look at the functions in the Categories . > (if present) and / or in the Function .
  • R-click the desired functions and add to the user category (if you use them), otherwise add to the parent mapped repository as> Mapped Feature.
  • R-click any node> Assembly Aggregation.

Important note: if you do not map any functions from this repository, the entire mirror repository will be mirror (the latest versions of all packages that I think, not all in the repo).

Fortunately, I did not have to get involved with the Exclusion Rules or the Rules of the actual configuration, which seem to complicate the situation. However, exclusion rules may be necessary if the repositories contain packages that have dependency conflicts, in which case one or more conflicting packages must be excluded.

While b3 Aggregator usually only downloads the latest version of each function that you have mapped (and its dependencies), if you reuse Build Aggregation over time as new versions are released, outdated versions will accumulate in your aggregation. You can use Clean and then Build Aggregation, but that means you have to restart everything. Instead, just add another .b3aggr aggregation file, install Build Root, add your configurations and add one contribution to the mapped repository using the path to your local final mirror directory. Do not specify any functions or create any categories. Then Build Aggregation and only the latest versions from your mirror will be aggregated!

+3
Aug 14 '15 at 12:35
source share

Eclipse plugins are usually dependent on other plugins. It is hard to trace the dependencies. It’s best to download all the dependencies using the update site and you can distribute them to other drops of Eclipse. For Eclipse 3.4 or later, you can use dropins, which is an Eclipse function. Thus, you do not need to install the plugin from the update site every time you need to reinstall your Eclipse. Read on http://michsan.web.id/content/how-install-eclipse-plugins-offline

If you do not see the website, I will give you some description

Prepare a directory for external plugins

Create a special directory to store our favorite plugins, for example. in / home / ichsan / eclipse -dropins we install the Maven plugin: m2eclipse.

 mkdir /home/ichsan/eclipse-dropins 

Now we will call this directory DROPINS

Sandbox Preparation

Next, using Git, we will create an Eclipse sandbox. The point is to install one plugin on the new Eclipse. Instead of installing a new Eclipse every time we want to install a new plugin, it is better to use Git to create a new branch for a new Eclipse.

First, extract / install the new Eclipse into the directory, e.g. / home / ichsan / eclipse-sandbox (so that we find / home / ichsan / eclipse-sandbox / eclipse.ini). We call the directory ECLIPSE_SANDBOX.

Then complete the new installation. This step needs to be done only once.

 cd $ECLIPSE_SANDBOX git init git add . git commit -am "Fresh Eclipse" 

Install the plugin in the sandbox

Now for the interesting part. Suppose we have to install the m2eclipse plugin. We will install this on a new Git branch so that the main branch remains clean or remains intact.

 cd $ECLIPSE_SANDBOX git checkout -b "m2eclipse" 

Now we will start Eclipse from ECLIPSE_SANDBOX and load the plugin. Once we are done, we close Eclipse and check what new directories or files have been created (using Git). Remember that we care about the new plugins and function directories and the contents inside them. Thus, we will not copy the rest into drops.

 # Prepare the m2eclipse plugin directories mkdir -p $DROPINS/m2eclipse/eclipse/plugins mkdir -p $DROPINS/m2eclipse/eclipse/features cd $ECLIPSE_SANDBOX for f in $(git status | sed "s/#\t//g" | grep -P "^plugins" ); do cp -R $f $DROPINS/m2eclipse/eclipse/plugins; done for f in $(git status | sed "s/#\t//g" | grep -P "^features"); do cp -R $f $DROPINS/m2eclipse/eclipse/features; done # Make the directory read only chmod -R -w $DROPINS/m2eclipse # Commit changes git add . git add -u git commit -am "M2Eclipse plugin installed" # Back to master branch to make Eclipse clean again and ready for other plugin installations git checkout master Installing the plugin 

Just copy the DROPINS / m2eclipse directory to ECLIPSE_HOME / dropins or create a symlink. And you're done!

 cd $ECLIPSE_HOME/dropins ln -s $DROPINS/m2eclipse 

Another way is to back up the differences between compiling fresh-Eclipse and committing after the plugin completes.

 for i in `git diff hashFreshEclipse hashPluginInstall --name-only`;do if [ -f $i ]; then tar -r -f m2e-android.tar $i fi done gzip m2e-android.tar 
+1
Feb 13 '11 at 12:35
source share

You can get it from here https://repository.sonatype.org/content/repositories/forge-sites/m2e/1.3.0/N/1.3.0.20121023-1108/

Download all files drilling plugins and features. Store in a directory on your machine, saving everything in one directory structure. Move it to a folder on your dev machine.

In Eclipse, go to Help | Intall New Software ... Click the Add button. Click the Local ... button. Locate the directory where you placed the files. Follow the onscreen instructions.

+1
Nov 26 '12 at 16:30
source share



All Articles