I was trying to use Deploper to load contribution and iterate the deployable
composites' contents. The composite returned does not have any components
returned. The only thing loaded is the composite name. I would like to
understand how I should be using Deployer to get the composite with the
right content.
Thanks for advise.
The following method is added in
sample-contribution-binding-sca-calculator's CalculatorTestCase
*public* *void* testDeployer() *throws* Exception{
ExtensionPointRegistry registry = *new* DefaultExtensionPointRegistry();
Deployer deployer = *new* DeployerImpl(registry);
deployer.start();
Monitor monitor = (Monitor)deployer.createMonitor();
org.apache.tuscany.sca.contribution.Contribution contribution =
deployer.loadContribution( *new* URI("ABC"),*new* URL(location), monitor);
Composite composite = contribution.getDeployables().get(0);
System.*out*.println("Compsite Name:"+composite);
*for* (Component c: composite.getComponents())
System.*out*.println(c.getName());
}
The output:
Compsite Name:Composite (name={http://sample}Calculator)
--
Thanks. Yang.