You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2007/05/10 18:06:08 UTC
svn commit: r536905 - in /incubator/tuscany/java/sca/samples:
helloworld-ws-reference/README helloworld-ws-reference/build.xml
helloworld-ws-service/README helloworld-ws-service/build.xml
Author: slaws
Date: Thu May 10 09:06:06 2007
New Revision: 536905
URL: http://svn.apache.org/viewvc?view=rev&rev=536905
Log:
add java jar build
Modified:
incubator/tuscany/java/sca/samples/helloworld-ws-reference/README
incubator/tuscany/java/sca/samples/helloworld-ws-reference/build.xml
incubator/tuscany/java/sca/samples/helloworld-ws-service/README
incubator/tuscany/java/sca/samples/helloworld-ws-service/build.xml
Modified: incubator/tuscany/java/sca/samples/helloworld-ws-reference/README
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-reference/README?view=diff&rev=536905&r1=536904&r2=536905
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-reference/README (original)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-reference/README Thu May 10 09:06:06 2007
@@ -6,6 +6,35 @@
general instructions about building and running samples. Take a look there
first.
+If you just want to run it to see what happens you need to run the server first
+so open a command prompt, navigate to the helloworld-ws-service sample directory
+and do
+
+ant
+
+OR if you don't have ant, on Windows do
+
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-service.jar helloworld.HelloWorldServer
+
+and on *nix do
+
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-service.jar helloworld.HelloWorldServer
+
+
+Once the server is running open a command prompt, navigate to this sample
+directory and do:
+
+ant
+
+OR if you don't have ant, on Windows do
+
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-reference.jar helloworld.HelloWorldClient
+
+and on *nix do
+
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-reference.jar helloworld.HelloWorldClient
+
+
Sample Overview
---------------
The sample provides a single component that is wired to a reference with a
@@ -44,10 +73,11 @@
cd helloworld-ws-service
ant
-Once done you now need to run this sample using the following commands;
+Once done you can now compile and run this sample using the following commands;
cd helloworld-ws-reference
-ant
+ant compile
+ant
You should see the following output from the run target.
Modified: incubator/tuscany/java/sca/samples/helloworld-ws-reference/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-reference/build.xml?view=diff&rev=536905&r1=536904&r2=536905
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-reference/build.xml (original)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-reference/build.xml Thu May 10 09:06:06 2007
@@ -17,7 +17,8 @@
* under the License.
-->
<project name="helloworld-ws-reference" default="run">
- <property environment="env"/>
+ <property name="test.class" value="helloworld.HelloWorldClient" />
+ <property name="test.jar" value="sample-helloworld-ws-reference.jar" />
<target name="init">
<mkdir dir="target/classes"/>
@@ -36,16 +37,31 @@
<copy todir="target/classes">
<fileset dir="src/main/resources"/>
</copy>
+ <jar destfile="target/${test.jar}" basedir="target/classes">
+ <manifest>
+ <attribute name="Main-Class" value="${test.class}" />
+ </manifest>
+ </jar>
</target>
- <target name="run" depends="compile">
- <java classname="helloworld.HelloWorldClient"
+ <target name="run-classes">
+ <java classname="${test.class}"
fork="true">
<classpath>
<pathelement path="target/classes"/>
<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
</classpath>
</java>
+ </target>
+
+ <target name="run">
+ <java classname="${test.class}"
+ fork="true">
+ <classpath>
+ <pathelement path="target/${test.jar}"/>
+ <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+ </classpath>
+ </java>
</target>
<target name="clean">
Modified: incubator/tuscany/java/sca/samples/helloworld-ws-service/README
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-service/README?view=diff&rev=536905&r1=536904&r2=536905
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-service/README (original)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-service/README Thu May 10 09:06:06 2007
@@ -6,6 +6,22 @@
general instructions about building and running samples. Take a look there
first.
+If you just want to run it to see what happens open a command prompt, navigate
+to this sample directory and do:
+
+ant
+
+OR if you don't have ant, on Windows do
+
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-helloworld-ws-service.jar helloworld.HelloWorldServer
+
+and on *nix do
+
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-helloworld-ws-service.jar helloworld.HelloWorldServer
+
+Now the server is started you can use the helloworld-ws-reference test to
+exercise it.
+
Sample Overview
---------------
The sample provides a single component that is wired to a service with a
@@ -39,7 +55,8 @@
following commands
cd helloworld-ws-service
-ant
+ant compile
+ant
You should see the following output from the run target.
Modified: incubator/tuscany/java/sca/samples/helloworld-ws-service/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-service/build.xml?view=diff&rev=536905&r1=536904&r2=536905
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws-service/build.xml (original)
+++ incubator/tuscany/java/sca/samples/helloworld-ws-service/build.xml Thu May 10 09:06:06 2007
@@ -17,7 +17,8 @@
* under the License.
-->
<project name="helloworld-ws-service" default="run">
- <property environment="env"/>
+ <property name="test.class" value="helloworld.HelloWorldServer" />
+ <property name="test.jar" value="sample-helloworld-ws-service.jar" />
<target name="init">
<mkdir dir="target/classes"/>
@@ -36,16 +37,31 @@
<copy todir="target/classes">
<fileset dir="src/main/resources"/>
</copy>
+ <jar destfile="target/${test.jar}" basedir="target/classes">
+ <manifest>
+ <attribute name="Main-Class" value="${test.class}" />
+ </manifest>
+ </jar>
</target>
- <target name="run" depends="compile">
- <java classname="helloworld.HelloWorldServer"
+ <target name="run-classes">
+ <java classname="${test.class}"
fork="true">
<classpath>
<pathelement path="target/classes"/>
<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
</classpath>
</java>
+ </target>
+
+ <target name="run">
+ <java classname="${test.class}"
+ fork="true">
+ <classpath>
+ <pathelement path="target/${test.jar}"/>
+ <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+ </classpath>
+ </java>
</target>
<target name="clean">
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org