Create a local Eclipse Update Site

Source: Internet
Author: User

Source: http://twasink.net/blog/archives/2004/07/creating_a_loca.html. If it is harmonious, XeroBank Browser (originally called torpark) must be used for access. The translation of this article is not approved by the original author.

The translation content is as follows:

 

After this is done the second time, I want to provide a detailed step to show you how to create an Eclipse Update site, and then put the existing plug-ins. In this example, I will build an Update site for the Weblogic plug-in.

Create an Update site

If you already have an update site, skip this step. Otherwise, you need to create a directory somewhere on the web server. The location of this directory is represented in $ update-dir.

In this directory, you need to create a file named site. xml. For now, we do not want to add content, so it is an empty file:

<? Xml version = "1.0" encoding = "UTF-8"?>
<Site>
</Site>

Create two subdirectories, plugins and features, under this directory.

Install local plug-ins

Download the plug-in and install it locally. simply copy it to $ ECLIPSE_HOME/plugins. The plug-in name is com. bea. eclipse. weblogic_1.1.1.

Then, start eclipse and confirm that the plug-in works properly. If you still cannot work properly, tidy up and coax your child :).

Upload plugin

Unfortunately, the eclipse Update site cannot capture subdirectories contained in the plug-in. Therefore, we need to package the plug-in into a jar. Make sure that you have reserved the Manifest information. The command is as follows:

Jar cvMf com. bea. eclipse. weblogic_1.1.1.jar-C com. bea. eclipse. weblogic_1.1.1

Copy the packaged jar file to the $ update_dir/plugins directory.

Create a feature Definition

Some plug-ins may not provide the feature definition, so we need to create one ourselves, but it is not difficult.

In the $ update-dir/features directory, create a directory with the same name as the plug-in, for example, com. bea. eclipse. weblogic_1.1.1. Create a feature. xml file in this directory. The content is as follows:

<? Xml version = "1.0" encoding = "UTF-8"?>
<Feature id = "com. bea. eclipse. weblogic" label = "Weblogic Plugin"
Version = "1.1.1" provider-name = "BEA Systems">
<Description>
This is a plugin to control a local Weblogic instance from
Within Eclipse.
</Description>

<License>
None mentioned
</License>

<Url>
<Update label = "My Update Site" url = "http: // [server] eclipse-updates/"/>
</Url>

<Plugin id = "com. bea. eclipse. weblogic" download-size = "0" install-size = "0" version = "1.1.1"/>
</Feature>

Return to the $ update-dir/features directory and put the directory you just created in a jar file, for example:

Jar cvf com. bea. eclipse. weblogic_1.1.1.jar-C com. bea. eclipse. weblogic_1.1.1

After execution, the directory is no longer needed. You can delete it.

Update the site. xml file

Now you need to use site. xml to release new features. The content of the new file is as follows:

<? Xml version = "1.0" encoding = "UTF-8"?>
<Site>
<Description url = "http: // eclipse-updates">
My Eclipse Update Server
</Description>
<Feature url = "features/com. bea. eclipse. weblogic_1.1.1.jar" id = "com. bea. eclipse. weblogic" version = "1.1.1">
<Category name = "App Server"/>
</Feature>
<Category-def name = "App Server" label = "Application Server">
<Description> Tools to control Application Servers </description>
</Category-def>
<Site>

That's all. Now you only need to download and install the plug-in from the Update site of eclipse (do not forget to delete the plug-in you just installed locally ).

 

 

The original text is as follows:

Creating a local Eclipse Update site

After having to work out how to do this again, I thought I 'd give a step-by-step guide to creating an Eclipse Update site, populated by existing plugins. for this example, I'll create an update site for the Weblogic Eclipse plugin.

Create the update site

If you 've already got one of these, skip this step. Otherwise, you'll need to create a directory on a webserver somewhere. This is referred to afterwards as $ update-dir.

In this is directory, you'll need to create a file called 'site. xml'. Because you don't have any thing there yet, this is pretty empty:

<? Xml version = "1.0" encoding = "UTF-8"?>
<Site>
</Site>

Create two directories underneath this one called plugins and @ features.

H2.Install the plugin locally

Download the plugin and install it locally, by copying it to $ ECLIPSE_HOME/plugins; the plugin is called com. bea. eclipse. weblogic_1.1.1

After this step, quickly start Eclipse and make sure the plugin is working. If it's not, pack up and go home.

Transform the plugin

Eclipse Update sites can't take plugin directories, unfortunately. so we need to package the plugin into a JAR. it is important to make sure you preserve the Manifest information. the command I used was:

Jar cvMf com. bea. eclipse. weblogic_1.1.1.jar-C com. bea. eclipse. weblogic_1.1.1

Copy the jar file to $ update-dir/plugins

Create a feature definition.

Odds are the plugin hasn't come with a feature definition, so you need to make one of those. It's not hard, however.

In $ update-dir/features, create a directory with the same name as the plugin, e.g. com. bea. eclipse. weblogic_1.1.1. then create a file called feature. xml in this new directory. the contents of the file look like this:

<? Xml version = "1.0" encoding = "UTF-8"?>
<Feature id = "com. bea. eclipse. weblogic" label = "Weblogic Plugin"
Version = "1.1.1" provider-name = "BEA Systems">
<Description>
This is a plugin to control a local Weblogic instance from
Within Eclipse.
</Description>

<License>
None mentioned
</License>

<Url>
<Update label = "My Update Site" url = "http: // [server] eclipse-updates/"/>
</Url>

<Plugin id = "com. bea. eclipse. weblogic" download-size = "0"
Install-size = "0" version = "1.1.1"/>
</Feature>

Back out to the $ update-dir/features directory and turn the directory you just made into a JAR. e.g.
Bc. jar cvf com. bea. eclipse. weblogic_1.1.1.jar-C com. bea. eclipse. weblogic_1.1.1

After this you can delete the directory if you want.

Update the site. xml file.

You now need to publish the new feature by updating the site. xml file. The new file looks like this:

<? Xml version = "1.0" encoding = "UTF-8"?>
<Site>
<Description url = "http: // eclipse-updates">
My Eclipse Update Server
</Description>
<Feature url = "features/com. bea. eclipse. weblogic_1.1.1.jar" id = "com. bea. eclipse. weblogic" version = "1.1.1">
<Category name = "App Server"/>
</Feature>
<Category-def name = "App Server" label = "Application Server">
<Description> Tools to control Application Servers </description>
</Category-def>
<Site>

And that's it. All you need to do now is point your Eclipse installation at the update site and download the feature (though you probably want to delete the locally installed plugin first ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.