On Feb 28, 2007, at 9:37 AM, Simon Laws wrote:

After talking a few weeks ago about how best to build Java I got distracted doing PHP SCA things. Anyhow I have actually got back to trying it out.

* I checked out head and the integration branch with the aim of running up
the calculator sample.
* I built Head using Raymond's splendid script [1] (maybe that should be in
svn somewhere ;-) and most of it seemed OK. I get the following error.

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running
org.apache.tuscany.sca.runtime.standalone.smoketest.SmokeTestAssemblyC on
tent
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.14 sec
Running
org.apache.tuscany.sca.runtime.standalone.smoketest.SmokeTestLauncher
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 11.657 sec
<<< F
AILURE!
testLauncherUsage(
org.apache.tuscany.sca.runtime.standalone.smoketest.SmokeTestL
auncher)  Time elapsed: 0.812 sec  <<< FAILURE!
junit.framework.ComparisonFailure: expected:<......> but was:<...
...>
       at junit.framework.Assert.assertEquals(Assert.java:81)
       at junit.framework.Assert.assertEquals (Assert.java:87)
       at
org.apache.tuscany.sca.runtime.standalone.smoketest.CommandTestCase.c
ompareOutput(CommandTestCase.java:37)
       at
org.apache.tuscany.sca.runtime.standalone.smoketest.SmokeTestLauncher
.testLauncherUsage(SmokeTestLauncher.java:40)

Not sure if this is significant.
This would be significant but I think this may be caused by the script you are running as the trunk build system is significantly different than the one in branch. The trunk has been stable for me.

To run the samples, as we have not cut a release yet, you will need to manually create a distribution. This should be pretty straightforward:

1. In /kernel do 'mvn'
2. In /runtime/standalone run 'mvn'
3. In /core-samples/common run 'mvn install'
4. In /core-samples/ run 'mvn install'
5. Run the calculator:

java -jar ../../../runtime/standalone/smoketest/target/assembly/bin/ launcher.jar target/calc.jar add 2 5

You should see 'result = 7.0'

The launcher syntax is java -jar <path to distribution> <path to application>

The two parameters '2' and '5' are for the application.

You can also do the same with the loan application statefull conversational sample except you will not need to build the common module (Step 3) and instead build /core-samples/loanapplication. Then run:

java -jar ../../../runtime/standalone/smoketest/target/assembly/bin/ launcher.jar target/loan-application.jar

If you want to remove debug, do (adjusting for your IDE, this works with IDEA):

java -Xdebug -Xnoagent -Djava.compiler=NONE - Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 - jar ../../../runtime/standalone/smoketest/target/assembly/bin/ launcher.jar target/loan-application.jar target/loan-application.jar

And start up remote debugging in your IDE. You can also run the launcher directly in the IDE. If you need to run integration tests, we have a JUnit component type that is part of the iTest pluging. This makes righting tests easy as you just create a TestCase and configure it as an SCA component.

Sorry for having to manually create the distro but once we have the release set, things should be as simple as just using java -jar <path to launcher> <sample app>.

Let me know how you get along.

Jim





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to