diff options
author | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-22 06:04:23 +0000 |
---|---|---|
committer | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-22 06:04:23 +0000 |
commit | d11cbfda813c7c6b32c06ddb33242fe3c82514eb (patch) | |
tree | 389bb50af828b565b671cf25973d5a720189e636 /sca-java-1.x/trunk/tutorials/travelsample/services | |
parent | ad0f6af9f59ce92f52e49746aad0fe4f4b55dd9d (diff) |
Make the JAX-WS runtime available when running the travel sample on JDK 5 (TUSCANY-3467)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@912490 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/trunk/tutorials/travelsample/services')
4 files changed, 56 insertions, 14 deletions
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/build.xml index 515df819c3..266dbec28c 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/build.xml +++ b/sca-java-1.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/build.xml @@ -23,9 +23,31 @@ <!-- The "run" target starts a JAX-WS service endpoint for a simple
credit card payment service. This endpoint does not appear to be
used currently anywhere else in the travel application. -->
- <target name="run">
+ <target name="run" depends="is-jdk6, jaxws-jdk6, jaxws-jdk5">
<java classname="scatours.creditcard.CreditCardServiceBootstrap" fork="true">
- <classpath location="target/${ant.project.name}.jar"/>
+ <classpath>
+ <pathelement location="target/${ant.project.name}.jar"/>
+ <path refid="jaxws-path"/>
+ </classpath>
</java>
</target>
+
+ <!-- check to see if we are running on JDK 6 -->
+ <target name="is-jdk6">
+ <condition property="jdk6">
+ <available classname="javax.xml.ws.Endpoint"/>
+ </condition>
+ </target>
+
+ <!-- JDK 6 contains JAX-WS so we don't need it on the classpath -->
+ <target name="jaxws-jdk6" if="jdk6">
+ <path id="jaxws-path"/>
+ </target>
+
+ <!-- on JDK 5 we need to add the JAX-WS runtime to the classpath -->
+ <target name="jaxws-jdk5" unless="jdk6">
+ <path id="jaxws-path">
+ <fileset dir="${env.JAXWS_HOME}/lib"/>
+ </path>
+ </target>
</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/pom.xml index c95a32815a..958292698e 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/pom.xml +++ b/sca-java-1.x/trunk/tutorials/travelsample/services/creditcard-payment-jaxws/pom.xml @@ -58,11 +58,10 @@ <version>2.2</version>
<configuration>
<archive>
- <manifest>
- <addClasspath>${scatours.selfContained}</addClasspath>
- <classpathPrefix>../lib/</classpathPrefix>
- <mainClass>scatours.creditcard.CreditCardServiceBootstrap</mainClass>
- </manifest>
+ <manifestEntries>
+ <Class-Path>../util/scatours-util-jaxws-runtime.jar</Class-Path>
+ <Main-Class>scatours.creditcard.CreditCardServiceBootstrap</Main-Class>
+ </manifestEntries>
</archive>
</configuration>
</plugin>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/build.xml index be9830cc1b..6c57e2420b 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/build.xml +++ b/sca-java-1.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/build.xml @@ -23,9 +23,31 @@ <!-- The "run" target starts a JAX-WS service endpoint for the
SMS gateway service. This endpoint is used by the "run" target
of the notification-ws launcher. -->
- <target name="run">
+ <target name="run" depends="is-jdk6, jaxws-jdk6, jaxws-jdk5">
<java classname="com.tuscanyscatours.smsgateway.SMSGatewayServiceBootstrap" fork="true">
- <classpath location="target/${ant.project.name}.jar"/>
+ <classpath>
+ <pathelement location="target/${ant.project.name}.jar"/>
+ <path refid="jaxws-path"/>
+ </classpath>
</java>
</target>
+
+ <!-- check to see if we are running on JDK 6 -->
+ <target name="is-jdk6">
+ <condition property="jdk6">
+ <available classname="javax.xml.ws.Endpoint"/>
+ </condition>
+ </target>
+
+ <!-- JDK 6 contains JAX-WS so we don't need it on the classpath -->
+ <target name="jaxws-jdk6" if="jdk6">
+ <path id="jaxws-path"/>
+ </target>
+
+ <!-- on JDK 5 we need to add the JAX-WS runtime to the classpath -->
+ <target name="jaxws-jdk5" unless="jdk6">
+ <path id="jaxws-path">
+ <fileset dir="${env.JAXWS_HOME}/lib"/>
+ </path>
+ </target>
</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/pom.xml index 233460e54f..a833c03b9e 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/pom.xml +++ b/sca-java-1.x/trunk/tutorials/travelsample/services/smsgateway-jaxws/pom.xml @@ -58,11 +58,10 @@ <version>2.2</version>
<configuration>
<archive>
- <manifest>
- <addClasspath>${scatours.selfContained}</addClasspath>
- <classpathPrefix>../lib/</classpathPrefix>
- <mainClass>com.tuscanyscatours.smsgateway.SMSGatewayServiceBootstrap</mainClass>
- </manifest>
+ <manifestEntries>
+ <Class-Path>../util/scatours-util-jaxws-runtime.jar</Class-Path>
+ <Main-Class>com.tuscanyscatours.smsgateway.SMSGatewayServiceBootstrap</Main-Class>
+ </manifestEntries>
</archive>
</configuration>
</plugin>
|