Hi.
When we converted the sun-xxx descriptors to glassfish-xxx I did not
get around to dealing with sun-acc.xml and its DTD.
To do so there are some pom changes:
In appclient/client/acc-config/pom.xml: (diffs below, entire file
attached)
We generate JAX-B classes based on the DTD. Some of the pom changes
cause us to use the new glassfish-application-client-container_1_3.dtd
(instead of its sun-xxx predecessor).
Note that for backward compatibility we still need to keep both DTDs.
The pom changes are mostly property definitions and usages (and
comments). (We used to be able to use the same property for both
identifying the sun-xxx.dtd to extract from the deployment/dtds module
and also for identifying the DTD we wanted JAX-B to use for code
generation. We still need to identify a single DTD for JAX-B
generation but we need to extract multiple DTDs from the other module,
so I've added a property and changed some of the property usage.)
Thanks.
- Tim
Index: appclient/client/acc-config/pom.xml
===================================================================
--- appclient/client/acc-config/pom.xml (revision 46073)
+++ appclient/client/acc-config/pom.xml (working copy)
@@ -62,7 +62,8 @@
<extracted-dtd-root>temp</extracted-dtd-root>
<extracted-dtd-top-level-directory>${extracted-dtd-root}/
glassfish</extracted-dtd-top-level-directory>
<extracted-dtd-directory>${extracted-dtd-top-level-
directory}/lib/dtds</extracted-dtd-directory>
- <config-dtd-file>sun-application-client-container_1_2.dtd</
config-dtd-file>
+ <dtd-for-jaxb-compilation>glassfish-application-client-
container_1_3.dtd</dtd-for-jaxb-compilation>
+ <config-dtd-file>*-application-client-container*.dtd</config-
dtd-file>
<added-test-classpath>${project.build.directory}/../$
{extracted-dtd-root}</added-test-classpath>
<!--
<config-xsd-dir>src/main/resources</config-xsd-dir>
@@ -96,9 +97,10 @@
<plugins>
<!--
- Extracts the sun-application-client-container_x_y.dtd
from the
+ Extracts the DTD(s) from the
deployment/dtds module into a temp file.
- The "generate" phase will use it to create JAXB
classes.
+ The "generate" phase will use it to create JAXB
classes.
+ Unit tests use both DTDs for parse testing.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -138,7 +140,7 @@
<artifactId>maven-jaxb2-plugin</artifactId>
<executions>
<execution>
- <id>JAXB-gen-for-sun-acc</id>
+ <id>JAXB-gen-for-glassfish-acc</id>
<goals>
<goal>generate</goal> <!-- must be
before compile -->
</goals>
@@ -152,7 +154,7 @@
-->
<generatePackage>org.glassfish.appclient.client.acc.config</
generatePackage>
<schemaIncludes>
- <include>${config-dtd-file}</include>
+ <include>${dtd-for-jaxb-compilation}</include>
<!--
<include>${config-xsd-file}</include>
-->
@@ -206,7 +208,8 @@
<dependencies>
<!--
We depend on the deployment/dtds module which contains the
- sun-application-client-container_1_2.dtd. We use that for
+ sun-application-client-container_1_2.dtd and
+ glassfish-application-client-container_1_3.dtd. We use
that for
generating JAXB classes but we do not want to package
the DTD
with the ACC module, nor do we want the ACC module
depending on
the deploymenet/dtds module at runtime. Note the scope
is "provided"