Hi, On Thu, Jun 23, 2011 at 1:17 PM, ant elder <[email protected]> wrote:
> Someone was asking me about how to load a contribution and get the > Tuscany model objects for its artifacts so I've just committed a > testcase to show one way of doing that, see: > > > https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DeployerTestCase.java > > That loads a contribution jar and then gets the composite, component > and service thats in the contribution. The main part of the code is: > > Node node = TuscanyRuntime.newInstance().createNode(); > String curi = > node.installContribution("src/test/resources/sample-helloworld.jar"); > node.validateContribution(curi); > Contribution contribution = node.getContribution(curi); > > If you wanted to run that in a separate Maven build outside of the > domain-node module build then the simplest dependency to use in a > Maven pom.xml is: > > <dependency> > <groupId>org.apache.tuscany.sca</groupId> > <artifactId>tuscany-base-runtime</artifactId> > <version>2.0-SNAPSHOT</version> > </dependency> > It seems like "2.0-SNAPSHOT" is not there in the Maven public repository, instead 2.0-Beta2. Is it okay to use 2.0-Beta2? > > That seems the simplest approach to me, there are other ways such as > using the Deployer directly, does anyone want to show some code to do > that? > > ...ant > -- Best Regards, Nirmal C.S.Nirmal J. Fernando Department of Computer Science & Engineering, Faculty of Engineering, University of Moratuwa, Sri Lanka. Blog: http://nirmalfdo.blogspot.com/
