We can download any eclipse plugin from repository and create its offline module by using a trick. To demonstrate, here we consider the ADT Plugin for eclipse. The repository URL to download the ADT Plugin is
https://dl-ssl.google.com/android/eclipse/
The repository url given above is used to download the plugin in ONLINE mode (via Eclipse > Help > Install New Software > Add this url and download the plugin through internet)
Now THE TRICK for offline installation :
1] Append the repository URL with site.xml
The URL becomes : https://dl-ssl.google.com/android/eclipse/site.xml
2] Save the site.xml file on computer.
3] Open site.xml in the text editor.
It Looks like
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description url="https://dl-ssl.google.com/android/eclipse/">
Update Site for Android Development Toolkit
</description>
<feature url="features/com.android.ide.eclipse.adt_16.0.1.v201112150204-238534.jar"
id="com.android.ide.eclipse.adt" version="16.0.1.v201112150204-238534">
<category name="developer"/>
</feature>
<feature url="features/com.android.ide.eclipse.ddms_16.0.1.v201112150204-238534.jar"
id="com.android.ide.eclipse.ddms" version="16.0.1.v201112150204-238534">
<category name="developer"/>
</feature>
<feature url="features/com.android.ide.eclipse.hierarchyviewer_16.0.1.v201112150204-238534.jar"
id="com.android.ide.eclipse.hierarchyviewer" version="16.0.1.v201112150204-238534">
<category name="developer"/>
</feature>
<feature url="features/com.android.ide.eclipse.traceview_16.0.1.v201112150204-238534.jar"
id="com.android.ide.eclipse.traceview" version="16.0.1.v201112150204-238534">
<category name="developer"/>
</feature>
<category-def name="developer" label="Developer Tools">
<description>
Features that add Android support to Eclipse for application developers.
</description>
</category-def>
</site>
4] Understanding what a feature is.
A plugin often refers to a feature, which may actually be a set of plugins. A feature provides certain functionality to end users and may technically consist of one or more plugins. Coming back to the site.xml, the interesting information is the url attribute of the feature tag. It points us to the feature jar in relation to the update site. This jar contains a feature.xml file carrying information about the feature, e.g. which plugins it consists of and where to find them.
5] Locating feature jars
By looking at the site.xml we can easily find the all the features, For example
<feature url="features/com.android.ide.eclipse.adt_16.0.1.v201112150204-238534.jar"
id="com.android.ide.eclipse.adt" version="16.0.1.v201112150204-238534">
Now, To download the particular feature we need to append the repository url with feature url.
So the modified url becomes
https://dl-ssl.google.com/android/eclipse/features/com.android.ide.eclipse.adt_16.0.1.v201112150204-238534.jar
Go to this url and download the feature jar
Do the same to download all the features from the file.
Note: Create the directory 'features' and save all the downloaded features(jars) in it.
6] Locating plugin jars
Open each feature jar file in 7-zip. It contains a feature.xml file.
Open it and locate the plugin category. It is as shown bellow
<plugin
id="com.android.ide.eclipse.adt"
download-size="0"
install-size="0"
version="16.0.1.v201112150204-238534"
unpack="false"/>
Now we need to create the final plugin URL from above data.
Building plugin URL.
From above info. we can find
a] Repository URL : https://dl-ssl.google.com/android/eclipse/
b] Sub-directory : plugins (Standard for all plugins)
c] plugin id : com.android.ide.eclipse.adt
d] Separator : _ (underscore)[It is a standard separator for plugin id and version]
e] plugin version : 16.0.1.v201112150204-238534
f] Extension : .jar [standard extension]
To create the final url append all the fields above in a] to f] order. We get
https://dl-ssl.google.com/android/eclipse/plugins/com.android.ide.eclipse.adt_16.0.1.v201112150204-238534.jar
Download the plugin.
Similarly Download all plugin jars from all features.
Note : Create a 'plugins' folder and store all downloaded plugin jars in it.
7] Creating final zip module for offline installation.
Create a new zip file and plugin-name.zip and add following folders and file in it
a] Add the 'features' folder.
b] Add 'plugins' folder.
c] add 'site.xml'.
Done.
This plugin-name.zip module can be used to install plugin in eclipse.
8] Installing the Plugin in eclipse : Offline
Eclipse > Help > Install New Software > Click Add Button >
Name : Type ADT
Location : Click Archive
Go to the location where the plugin-name.zip is present and add it.
Follow the steps and complete installation in eclipse.
DONE.
*********
This trick can be applied to download any plugin from repository and installing it offline.
https://dl-ssl.google.com/android/eclipse/
The repository url given above is used to download the plugin in ONLINE mode (via Eclipse > Help > Install New Software > Add this url and download the plugin through internet)
Now THE TRICK for offline installation :
1] Append the repository URL with site.xml
The URL becomes : https://dl-ssl.google.com/android/eclipse/site.xml
2] Save the site.xml file on computer.
3] Open site.xml in the text editor.
It Looks like
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description url="https://dl-ssl.google.com/android/eclipse/">
Update Site for Android Development Toolkit
</description>
<feature url="features/com.android.ide.eclipse.adt_16.0.1.v201112150204-238534.jar"
id="com.android.ide.eclipse.adt" version="16.0.1.v201112150204-238534">
<category name="developer"/>
</feature>
<feature url="features/com.android.ide.eclipse.ddms_16.0.1.v201112150204-238534.jar"
id="com.android.ide.eclipse.ddms" version="16.0.1.v201112150204-238534">
<category name="developer"/>
</feature>
<feature url="features/com.android.ide.eclipse.hierarchyviewer_16.0.1.v201112150204-238534.jar"
id="com.android.ide.eclipse.hierarchyviewer" version="16.0.1.v201112150204-238534">
<category name="developer"/>
</feature>
<feature url="features/com.android.ide.eclipse.traceview_16.0.1.v201112150204-238534.jar"
id="com.android.ide.eclipse.traceview" version="16.0.1.v201112150204-238534">
<category name="developer"/>
</feature>
<category-def name="developer" label="Developer Tools">
<description>
Features that add Android support to Eclipse for application developers.
</description>
</category-def>
</site>
4] Understanding what a feature is.
A plugin often refers to a feature, which may actually be a set of plugins. A feature provides certain functionality to end users and may technically consist of one or more plugins. Coming back to the site.xml, the interesting information is the url attribute of the feature tag. It points us to the feature jar in relation to the update site. This jar contains a feature.xml file carrying information about the feature, e.g. which plugins it consists of and where to find them.
5] Locating feature jars
By looking at the site.xml we can easily find the all the features, For example
<feature url="features/com.android.ide.eclipse.adt_16.0.1.v201112150204-238534.jar"
id="com.android.ide.eclipse.adt" version="16.0.1.v201112150204-238534">
Now, To download the particular feature we need to append the repository url with feature url.
So the modified url becomes
https://dl-ssl.google.com/android/eclipse/features/com.android.ide.eclipse.adt_16.0.1.v201112150204-238534.jar
Go to this url and download the feature jar
Do the same to download all the features from the file.
Note: Create the directory 'features' and save all the downloaded features(jars) in it.
6] Locating plugin jars
Open each feature jar file in 7-zip. It contains a feature.xml file.
Open it and locate the plugin category. It is as shown bellow
<plugin
id="com.android.ide.eclipse.adt"
download-size="0"
install-size="0"
version="16.0.1.v201112150204-238534"
unpack="false"/>
Now we need to create the final plugin URL from above data.
Building plugin URL.
From above info. we can find
a] Repository URL : https://dl-ssl.google.com/android/eclipse/
b] Sub-directory : plugins (Standard for all plugins)
c] plugin id : com.android.ide.eclipse.adt
d] Separator : _ (underscore)[It is a standard separator for plugin id and version]
e] plugin version : 16.0.1.v201112150204-238534
f] Extension : .jar [standard extension]
To create the final url append all the fields above in a] to f] order. We get
https://dl-ssl.google.com/android/eclipse/plugins/com.android.ide.eclipse.adt_16.0.1.v201112150204-238534.jar
Download the plugin.
Similarly Download all plugin jars from all features.
Note : Create a 'plugins' folder and store all downloaded plugin jars in it.
7] Creating final zip module for offline installation.
Create a new zip file and plugin-name.zip and add following folders and file in it
a] Add the 'features' folder.
b] Add 'plugins' folder.
c] add 'site.xml'.
Done.
This plugin-name.zip module can be used to install plugin in eclipse.
8] Installing the Plugin in eclipse : Offline
Eclipse > Help > Install New Software > Click Add Button >
Name : Type ADT
Location : Click Archive
Go to the location where the plugin-name.zip is present and add it.
Follow the steps and complete installation in eclipse.
DONE.
*********
This trick can be applied to download any plugin from repository and installing it offline.
No comments:
Post a Comment