dev@glassfish.java.net

[action] pom change review - build a class-path-only JAR (for use by clients) to JMS-related JARs

From: Tim Quinn <Timothy.Quinn_at_Sun.COM>
Date: Mon, 27 Apr 2009 19:12:31 -0500

Hi, everyone.

Three parts to these changes:

1. Addition of new submodule appclient/client/acc-jms-ref which creates
a class-path-only JAR. The Class-Path refers to the JMS-related JARs
needed by clients using queuing.

appclient/client/acc-jms-ref/pom.xml (new, attached)

2. Change to appclient/client/acc-standalone/pom.xml to add a dependency
on the JAR created in #1. (diffs below)

3. Change to appclient/client/pom.xml to refer to the new submodule in
#1. (diffs below)



I decided to create this extra JAR (not used by the server) because:

a. We let maven compute the Class-Path for the acc-standalone JAR.
Ideally I'd augment that generated Class-Path with the additional
entries for the queuing JARs but the maven archiver does not (at least
as far as I can tell) permit the pom to add to its generated class path.

b. I could not simply add JMS-related modules to the list of
dependencies for the acc-standalone module. To create the generated
Class-Path that fits the way we install the module JARs (no version
information) I can specify the format which works for the JARs in the
modules directory, but the maven archiver does not permit different
formats for different JARs (which I would need to refer to the
JMS-related JARs in the glassfishv3/mq tree).

Using the approach I took I can still let maven compute the (lengthy and
potentially changeable) class path for the acc-standalone JAR while
making sure the queuing-related JARs are incorporated into clients'
class paths.

If anyone can suggest alternatives that would eliminate the extra JAR
(without requiring a hard-coded class path for acc-standalone) I would
be very happy to hear them.

- Tim

Index: client/acc-standalone/pom.xml
===================================================================
--- client/acc-standalone/pom.xml (revision 26634)
+++ client/acc-standalone/pom.xml (working copy)
@@ -137,7 +137,7 @@
 
     <dependencies>
         <!--
- We only need to specify the ACC's OSGi JAR as the single
dependency.
+ We specify the ACC's OSGi JAR as a dependency.
             The maven-jar-plugin will do the work of finding the transitive
             closure of it and the modules on which it depends to build the
             accurate Class-Path for the manifest.
@@ -148,5 +148,11 @@
             <version>${project.version}</version>
         </dependency>
 
+ <dependency>
+ <groupId>org.glassfish.appclient</groupId>
+ <artifactId>gf-client-jms-ref</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
    </dependencies>
 </project>
Index: client/pom.xml
===================================================================
--- client/pom.xml (revision 26634)
+++ client/pom.xml (working copy)
@@ -51,8 +51,13 @@
     <modules>
         <module>appclient-scripts</module>
         <module>acc-config</module>
+ <module>acc-jms-ref</module>
         <module>acc</module>
         <module>acc-standalone</module>
+ <!--
+ Can uncomment the following once the server ignores
targeted JARs in /lib
+ -->
+<!-- <module>acc-appserv-rt</module> -->
         <!-- JWS support is not yet implemented
         <module>jws</module>
         -->