Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] Missing third party files


Hi Everyone,
     The latest wtp driver 20050223 contains code that checks for missing third party files.  If any files are missing an error dialog is popped up at eclipse startup time to notify them that the files are missing.  Right now this dialog checks for the third party files that Web services requires, but other components that have third party file dependencies can use this facility as well.  Two extension points have been created to do this.  This first extension point defines the files that should be checked and the second defines the components that are affected by the missing files.  For example, Web services requires many third party files to be located in five different plugins.(  org.eclipse.wst.ws.apache.axis,  org.eclipse.wst.ws.apache.soap, org.eclipse.wst.ws.apache.wsil, org.eclipse.wst.ws.uddi4j, and org.eclipse.wst.wsdl )  Each of these plugins have extensions for  the org.eclipse.wst.common.dependencychecker.requiredFiles extension point.  Here is an example of what the org.eclipse.wst.wsdl plugin extension looks like.

   <extension point="org.eclipse.wst.common.dependencychecker.requiredFiles">
      <requiredFile
            pluginRelativePath="lib/qname.jar"
            locationURL="ftp://www-126.ibm.com/pub/wsdl4j/WSDL4J/1.4/wsdl4j-bin-1.4.zip"/>
      <requiredFile
            pluginRelativePath="lib/wsdl4j.jar"
            locationURL="ftp://www-126.ibm.com/pub/wsdl4j/WSDL4J/1.4/wsdl4j-bin-1.4.zip"/>
   </extension>

This extension states that the wsdl plugin requires two JAR files qname.jar and wsdl4j.jar and where on the internet these files can be located.  The locationURL attribute is displayed in the error dialog that pops up.

The second extension point defines the components that are affected by the missing files.  A list of the components affected will be displayed in the dialog that pops up at startup.  This extension should be placed in a plugin that is affected by the missing files.   Here is an example of the extension that Web services has in the org.eclipse.jst.ws.consumption.ui plugin.

   <extension point="org.eclipse.wst.common.dependencychecker.dependencies">
     <dependency description="%FEATURE_DESCRIPTION">
       <requiredPlugin id="org.eclipse.wst.ws.apache.axis"/>
       <requiredPlugin id="org.eclipse.wst.ws.apache.soap"/>
       <requiredPlugin id="org.eclipse.wst.ws.apache.wsil"/>
       <requiredPlugin id="org.eclipse.wst.ws.uddi4j"/>
       <requiredPlugin id="org.eclipse.wst.wsdl"/>
     </dependency>
   </extension>

This extension lists the five plugins that Web services depends on that have third party JAR files.  The description attribute contains a string that will be displayed to the user in the dialog box.  This string should contain a description of the component that requires the missing files.

The code that does this missing file check remembers the components that had missing files.  If you want your plugin code to query for missing files you can use the following static method call.

CheckMissingFiles.hasMissingFiles( pluginId )  

where pluginId is the plugin id where your org.eclipse.wst.common.dependencychecker.dependencies extension is defined.

The CheckMissingFiles class is located in the org.eclipse.wst.common.dependencychecker plugin.

Let me know if you have any questions.  Thanks.


Peter Moogk
Rational Developer
Web Services Development
IBM Canada Ltd.
pmoogk@xxxxxxxxxx
D3-353/ENX/8200/MKM
(905) 413-3458

Back to the top