| Summary: | Support easy downloading of libraries | ||
|---|---|---|---|
| Product: | [WebTools] WTP Common Tools | Reporter: | Konstantin Komissarchik <konstantin> |
| Component: | Faceted Project Framework | Assignee: | Konstantin Komissarchik <konstantin> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | konstantin, neil.hauge, paul.fullbright, shaun.smith |
| Version: | 3.1 | Keywords: | plan |
| Target Milestone: | 3.1 M5 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Konstantin Komissarchik
Released feature into 3.1 M5 code stream. The feature is documented in the org.eclipse.jst.common.project.facet.core.downloadableLibraries extension point, but I will summarize it here.
A library definitions file contains information about one or more libraries that are available for download. Here is an example:
<libraries>
<library>
<name>EclipseLink 1.0.0</name>
<download-provider>Eclipse Foundation</download-provider>
<download-url><![CDATA[http://www.eclipse.org/downloads/download.php?file=/rt/eclipselink/releases/1.0/eclipselink-1.0.zip&url=http://download.eclipse.org/rt/eclipselink/releases/1.0/eclipselink-1.0.zip&mirror_id=1]]></download-url>
<license-url><![CDATA[http://www.eclipse.org/legal/epl-v10.html]]></license-url>>
<attributes>
<component>eclipselink/jlib/eclipselink.jar</component>
<source>eclipselink/jlib/eclipselink-src.zip</source>
<javadoc>eclipselink/eclipselink-javadocs.zip!eclipselink/javadocs</javadoc>
</attributes>
</library>
</libraries>
The definitions file can be placed inside a plugin or on a web server. It is then referenced from the extension point like so...
<extension point="org.eclipse.jst.common.project.facet.core.downloadableLibraries">
<import-definitions url="http://www.eclipse.org/fproj/jpa-demo-libs.xml">
<enablement>
<with variable="requestingProjectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
</with>
</enablement>
</import-definitions>
</extension>
For definitions held inside a plugin, use path attribute instead of the url attribute. The enablement element controls the context in which the referenced definitions apply. The expression context is identical to the context used for library provider enablement. In the above example, the referenced definitions apply only if the facet that's being configured is JPA.
To help with short-term demos I put a definitions file with EclipseLink 1.0, 1.0.1 and 1.0.2 at http://www.eclipse.org/fproj/jpa-demo-libs.xml and added the above extension to one of the framework plugins. This means that the next good i-build will be able to find and download these libraries.
|