I chatted with Luciano about this the other day and we debugged through it and it turns out the problem was caused by some module test classes being added to the samples classpath. It looked like that could have been caused by a bug in the mvn -Peclipse .classpath generation though i've not been able to recreate it. Does anyone else see any of the module test classes in the samples referenced libraries in Eclipse?
...ant On Sat, Nov 22, 2008 at 5:11 AM, <[email protected]> wrote: > Author: lresende > Date: Fri Nov 21 21:11:38 2008 > New Revision: 719807 > > URL: http://svn.apache.org/viewvc?rev=719807&view=rev > Log: > Using contribution helper to properly discover the contribution location > > Modified: > > tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java > > Modified: > tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java > URL: > http://svn.apache.org/viewvc/tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java?rev=719807&r1=719806&r2=719807&view=diff > ============================================================================== > --- > tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java > (original) > +++ > tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java > Fri Nov 21 21:11:38 2008 > @@ -18,9 +18,11 @@ > */ > package calculator; > > -import static org.junit.Assert.*; > +import static org.junit.Assert.assertEquals; > > import org.apache.tuscany.sca.node.Client; > +import org.apache.tuscany.sca.node.Contribution; > +import org.apache.tuscany.sca.node.ContributionLocationHelper; > import org.apache.tuscany.sca.node.Node; > import org.apache.tuscany.sca.node.NodeFactory; > import org.junit.AfterClass; > @@ -40,7 +42,9 @@ > > @BeforeClass > public static void setUpBeforeClass() throws Exception { > - node = NodeFactory.newInstance().createNode(); > + NodeFactory factory = NodeFactory.newInstance(); > + String contribution = > ContributionLocationHelper.getContributionLocation(CalculatorClient.class); > + node = factory.createNode("Calculator.composite", new > Contribution("calculator", contribution)); > node.start(); > > calculatorService = > ((Client)node).getService(CalculatorService.class, > "CalculatorServiceComponent"); > > >
