diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-22 01:03:53 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-22 01:03:53 +0000 |
commit | a770a0cd29a37998e805287dca090cae44109bdb (patch) | |
tree | 9923aa6eee1c62cdde6111c947031f41611733e7 /branches/sca-equinox/samples | |
parent | 5b2c0562e87008db1d69ddb3b8e3769d561aa37d (diff) |
Added support for several bundle packaging and distribution schemes (jars and class folders, distribution and development workspace). Changed the RCP sample to use the node-launcher.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@697650 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/samples')
5 files changed, 35 insertions, 45 deletions
diff --git a/branches/sca-equinox/samples/calculator-rcp/META-INF/MANIFEST.MF b/branches/sca-equinox/samples/calculator-rcp/META-INF/MANIFEST.MF deleted file mode 100644 index 4a2e7380a9..0000000000 --- a/branches/sca-equinox/samples/calculator-rcp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,27 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Apache Tuscany SCA Calculator RCP Sample -Bundle-SymbolicName: sample.calculator.rcp;singleton:=true -Bundle-Version: 1.4.0.SNAPSHOT -Bundle-Activator: calculator.rcp.Activator -Bundle-Vendor: The Apache Software Foundation -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-ActivationPolicy: lazy -Import-Package: org.apache.tuscany.sca.extensibility.equinox;version="1.4.0", - org.apache.tuscany.sca.node;version="1.4.0", - org.osoa.sca;version="1.4.0", - org.osoa.sca.annotations;version="1.4.0" -Bundle-ClassPath: ., - cglib-nodep-2.1_3.jar, - jaxb-impl-2.1.7.jar, - activation-1.1.jar, - jsr250-api-1.0.jar, - jsr181-api-1.0-MR1.jar, - jaxb-api-2.1.jar, - stax-api-1.0-2.jar, - jaxws-api-2.1.jar, - geronimo-commonj_1.1_spec-1.0.jar, - XmlSchema-1.3.2.jar, - wstx-asl-3.2.1.jar diff --git a/branches/sca-equinox/samples/calculator-rcp/META-INF/README b/branches/sca-equinox/samples/calculator-rcp/META-INF/README new file mode 100644 index 0000000000..009570154d --- /dev/null +++ b/branches/sca-equinox/samples/calculator-rcp/META-INF/README @@ -0,0 +1 @@ +This directory contains a generated MANIFEST.MF file. diff --git a/branches/sca-equinox/samples/calculator-rcp/pom.xml b/branches/sca-equinox/samples/calculator-rcp/pom.xml index 3b06fe37ea..1f25539c37 100644 --- a/branches/sca-equinox/samples/calculator-rcp/pom.xml +++ b/branches/sca-equinox/samples/calculator-rcp/pom.xml @@ -41,30 +41,35 @@ <artifactId>tuscany-node-api</artifactId> <version>1.4-SNAPSHOT</version> </dependency> + <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-node-impl</artifactId> <version>1.4-SNAPSHOT</version> <scope>runtime</scope> </dependency> + <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-implementation-java-runtime</artifactId> <version>1.4-SNAPSHOT</version> <scope>runtime</scope> </dependency> + <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-implementation-node-runtime</artifactId> <version>1.4-SNAPSHOT</version> <scope>runtime</scope> </dependency> + <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-extensibility-equinox</artifactId> <version>1.4-SNAPSHOT</version> <scope>runtime</scope> </dependency> + <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-node-launcher-equinox</artifactId> @@ -173,6 +178,34 @@ </classpathContainers> </configuration> </plugin> + + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <version>1.4.3</version> + <extensions>true</extensions> + <executions> + <execution> + <id>bundle-manifest</id> + <phase>process-classes</phase> + <goals> + <goal>manifest</goal> + </goals> + <configuration> + <instructions> + <Bundle-Version>1.4</Bundle-Version> + <Bundle-SymbolicName>sample.calculator.rcp;singleton:=true</Bundle-SymbolicName> + <Bundle-Description>${pom.name}</Bundle-Description> + <Bundle-Activator>calculator.rcp.Activator</Bundle-Activator> + <Eclipse-LazyStart>true</Eclipse-LazyStart> + <Export-Package>calculator.rcp*</Export-Package> + </instructions> + <manifestLocation>${basedir}/META-INF</manifestLocation> + </configuration> + </execution> + </executions> + </plugin> + <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> diff --git a/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java b/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java index 2b1bae34de..6a5d3cc5f4 100644 --- a/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java +++ b/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java @@ -20,7 +20,6 @@ package calculator.rcp; import java.io.File; -import org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer; import org.apache.tuscany.sca.node.SCANode; import org.apache.tuscany.sca.node.equinox.launcher.Contribution; import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; @@ -42,28 +41,18 @@ public class Activator extends AbstractUIPlugin { private NodeLauncher launcher; private SCANode node; - /** - * The constructor - */ public Activator() { } - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ public void start(BundleContext context) throws Exception { super.start(context); plugin = this; + launcher = NodeLauncher.newInstance(); node = launcher.createNode("Calculator.composite", new Contribution("c1", new File("target/classes").toURI().toString())); node.start(); } - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); diff --git a/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java b/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java index 5ce6522fed..137c7307ac 100644 --- a/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java +++ b/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java @@ -29,9 +29,6 @@ import org.eclipse.ui.PlatformUI; */ public class Application implements IApplication { - /* (non-Javadoc) - * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext) - */ public Object start(IApplicationContext context) { Display display = PlatformUI.createDisplay(); try { @@ -45,9 +42,6 @@ public class Application implements IApplication { } } - /* (non-Javadoc) - * @see org.eclipse.equinox.app.IApplication#stop() - */ public void stop() { final IWorkbench workbench = PlatformUI.getWorkbench(); if (workbench == null) |