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.SmokeTestAssemblyCon
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.
I'm now not sure how to try the calculator sample. I cd to sca/core-samples
(from the mail list this seems to be the correct version of the calculator
sample [2]) and run
"mvn install" but it doesn't seem to do anything. Playing with building
various modules this is what seemed to work for me.
cd sca/runtime/itest; mvn install
cd sca/core-samples/common; mvn install
cd sca/core-samples/standalone/calculator; mvn install
Seems to run the test successfully but I can't tell now how to run this test
from the command line. The instructions in the readme suggest using "mvn
dependency:unpack" but I don't see any dependency plugin configuration in
the pom files here abouts so I guess this isn't going to work.
Can someone confirm whether standalone operation works in the calculator
sample in head and if so how to do it?
By way of light relief I thought I would try the same on the integration
branch.
* I was able to build and run the sample in the integration branch in mvn
but the standalone runtime doesn't seem to be supported here either. Is that
correct?
* Anyhow I took the next step and pulled the project into eclipse and it was
happy to let me debug the test as a JUnit test so I'm set for a bit of
experimentation.
I'm assuming that this mode of debugging will also work for Head but I
haven't tried it yet. I'd be interested to know if there is a general mode
of operation for debugging samples that people have adopted, e.g. debug from
standalone runtime
JUnit tests
With some clever mvn settings(?) and attach remotely
System.out :-)
Something else...
Regards
Simon
[1] http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg14659.html
[2] http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg14530.html