ToolLibraries
Contents |
Problem
J2eePlatform implementation (J2EE Server API) specifies the list of jar files that are required by particular tool (Ant task). Usually those jars are required by specific ant task corresponding to particular command line tool. Examples:
- wsimport tool (JAX-WS 2.1 runtime)
- wscompile tool (JAX-RPC 1.6 runtime)
Currently, there is an API method: J2eePlatform:getClasspathEntries(String toolName), providing the list of jar files for given tool.
The method is called by Web/EJB project to specify some properties, eg.
private.properties:
... j2ee.platform.wsimport.classpath=/home/mkuchtiak/glassfish/glassfish/lib/webservices-tools.jar:/home/mkuchtiak/glassfish/glassfish/lib/webservices-rt.jar:... ...
or
project.properties
...
j2ee.platform.wsimport.classpath=${libs.GlassFish_V2.wsimport}
...
and nblibraries.properties
...
libs.GlassFish_V2.wsimport=\
${base}/GlassFish_V2/webservices-tools.jar:\
${base}/GlassFish_V2/webservices-rt.jar:\
${base}/GlassFish_V2/appserv-jstl.jar:\
${base}/GlassFish_V2/javaee.jar:\
${base}/GlassFish_V2/appserv-ws.jar:\
${base}/GlassFish_V2/mail.jar:\
${base}/GlassFish_V2/activation.jar
...
Issues:
- properties (like j2ee.platform.wsimport.classpath) are set in Web/EJB project in time when project is created/opened
- Moreover the properties are set for all ever possible tools, even when the support, like JAX-RPC, is not installed.
When trying to replace the usage of J2eePlatform:getClasspathEntries(String toolName) with new WS STACK API we hit the problems:
- it is difficult (or impossible) to find out if project has shareable libraries or not
- it is difficult (or impossible) to set up property in nblibraries.properties
Summarry
We need some Project+J2EE Servet API extension to:
- set up the property, representing the list of jar files, regardless the project has shareable libraries or not
or
- be able to detect if project has shareable libraries or not
- be able to copy jars from server location to library folder
- be able to set up property in nblibraries.properties
Note: the property, representing the list of jar files, should be set up on demand, e.g. when the first Web Service/WS Client is created

