summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test')
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/itest/nodes/Helloworld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/ContributionClassLoaderTestCase.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/ContributionUpdateTestCase.java75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DependencyUtilsTestCase.java61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DeployerTestCase.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DirectoryDomainTestCase.java123
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/Node2TestCase.java315
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/UsedCompositesTestCase.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/ClassLoaderReleaseTestCase.java66
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java96
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DomainCompositeTestCase.java71
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DynamicTestCase.java116
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/PerfTest.java74
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java190
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/sample/Helloworld.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/compositeImpl.composite30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/export.jarbin2285 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld-invalidComposite.jarbin4868 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld2.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld2.jarbin5620 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworldNode.xml27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/import.jarbin3932 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/include.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jarbin4779 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jarbin4586 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/nested.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld-nodeployable.jarbin4761 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld.jarbin4808 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld2.jarbin4845 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sca-contribution-generated.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/domain.properties17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.deployable.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.jarbin4788 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/readme.txt8
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/NodeXMLDomain/node.xml27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/NodeXMLDomain/readme.txt2
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/default/readme.txt4
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/default/sample-helloworld.jarbin4808 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/export1.jarbin2270 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/export2.jarbin2269 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import1.dependencies19
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import1.jarbin3969 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import2.dependencies19
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import2.jarbin3969 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/readme.txt14
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/readme.txt4
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld.jarbin4808 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/MANIFEST.MF14
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.properties5
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.xml58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/helloworld.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/sample/Helloworld.classbin251 -> 0 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/sample/HelloworldImpl.classbin819 -> 0 bytes
57 files changed, 0 insertions, 1983 deletions
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/itest/nodes/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/itest/nodes/Helloworld.java
deleted file mode 100644
index 76f8d4400d..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/itest/nodes/Helloworld.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package itest.nodes;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Helloworld {
-
- String sayHello(String name);
-
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/ContributionClassLoaderTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/ContributionClassLoaderTestCase.java
deleted file mode 100644
index 298c20b093..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/ContributionClassLoaderTestCase.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.impl;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.apache.tuscany.sca.runtime.ActivationException;
-import org.junit.Test;
-
-/**
- * Tests that the contribution classloader is created after doing a validateContribution
- */
-public class ContributionClassLoaderTestCase {
-
- @Test
- public void testInstallDeployable() throws ContributionReadException, ValidationException, ActivationException {
- Node node = TuscanyRuntime.newInstance().createNode();
- String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
- Contribution contribution = node.getContribution(curi);
- Assert.assertNull(contribution.getClassLoader());
- node.validateContribution(curi);
- ClassLoader cl1 = contribution.getClassLoader();
- Assert.assertNotNull(cl1);
- node.startComposite(curi, "helloworld.composite");
- Assert.assertEquals(cl1, node.getContribution(curi).getClassLoader());
- }
-
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/ContributionUpdateTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/ContributionUpdateTestCase.java
deleted file mode 100644
index f270eb3f23..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/ContributionUpdateTestCase.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.impl;
-
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.util.Collection;
-
-import javax.xml.stream.XMLStreamException;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.assembly.Endpoint;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.apache.tuscany.sca.runtime.ActivationException;
-import org.junit.Assert;
-import org.junit.Test;
-import org.oasisopen.sca.NoSuchDomainException;
-import org.oasisopen.sca.NoSuchServiceException;
-
-public class ContributionUpdateTestCase {
-
- @Test
- public void updateTest1() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException, FileNotFoundException {
- Node node = TuscanyRuntime.newInstance().createNode("updateTest1");
- String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
- node.startDeployables(curi);
-
- Collection<Endpoint> eps = ((NodeImpl)node).getEndpointRegistry().getEndpoints();
- Assert.assertEquals(1, eps.size());
- Assert.assertEquals("HelloworldComponent#service-binding(Helloworld/Helloworld)", eps.iterator().next().getURI());
-
- ((NodeImpl)node).updateContribution(curi, "src/test/resources/sample-helloworld2.jar", null, null);
-
- eps = ((NodeImpl)node).getEndpointRegistry().getEndpoints();
- Assert.assertEquals(1, eps.size());
- Assert.assertEquals("Helloworld2Component#service-binding(Helloworld/Helloworld)", eps.iterator().next().getURI());
- }
-
- @Test
- public void updateWithAdditionalDeployablesTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException, FileNotFoundException {
- Node node = TuscanyRuntime.newInstance().createNode("updateWithAdditionalDeployablesTest");
- String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
- String compURI = node.addDeploymentComposite(curi, new FileReader("src/test/resources/helloworld2.composite"));
- node.startComposite(curi, compURI);
-
- Collection<Endpoint> eps = ((NodeImpl)node).getEndpointRegistry().getEndpoints();
- Assert.assertEquals(1, eps.size());
- Assert.assertEquals("Helloworld2Component#service-binding(Helloworld/Helloworld)", eps.iterator().next().getURI());
-
- ((NodeImpl)node).updateContribution(curi, "src/test/resources/sample-helloworld.jar", null, null);
-
- eps = ((NodeImpl)node).getEndpointRegistry().getEndpoints();
- Assert.assertEquals(1, eps.size());
- Assert.assertEquals("Helloworld2Component#service-binding(Helloworld/Helloworld)", eps.iterator().next().getURI());
- }
-
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DependencyUtilsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DependencyUtilsTestCase.java
deleted file mode 100644
index a2e6abd893..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DependencyUtilsTestCase.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.impl;
-
-import java.io.BufferedInputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.ZipInputStream;
-
-import javax.xml.stream.XMLStreamException;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.junit.Test;
-
-public class DependencyUtilsTestCase {
-
- @Test
- public void loadTest() throws ValidationException, ContributionReadException, FileNotFoundException, IOException, XMLStreamException {
-
- List<String> importDs = DependencyUtils.getDependencies("import", initZips());
- Assert.assertEquals(1, importDs.size());
- Assert.assertEquals("export", importDs.get(0));
-
- List<String> exportDs = DependencyUtils.getDependencies("export", initZips());
- Assert.assertEquals(0, exportDs.size());
-
- List<String> unrelatedDs = DependencyUtils.getDependencies("unrelated", initZips());
- Assert.assertEquals(0, unrelatedDs.size());
- }
-
- private Map<String, ZipInputStream> initZips() throws FileNotFoundException {
- Map<String, ZipInputStream> contributions = new HashMap<String, ZipInputStream>();
- contributions.put("import", new ZipInputStream(new BufferedInputStream(new FileInputStream("src/test/resources/import.jar"))));
- contributions.put("export", new ZipInputStream(new BufferedInputStream(new FileInputStream("src/test/resources/export.jar"))));
- contributions.put("unrelated", new ZipInputStream(new BufferedInputStream(new FileInputStream("src/test/resources/sample-helloworld-nodeployable.jar"))));
- return contributions;
- }
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DeployerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DeployerTestCase.java
deleted file mode 100644
index 9892b0d8a7..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DeployerTestCase.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.impl;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.assembly.Component;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class DeployerTestCase {
-
- @Test
- public void testArtifacts() throws ContributionReadException, ValidationException {
-
- Node node = TuscanyRuntime.newInstance().createNode();
- String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
- node.validateContribution(curi);
-
- Contribution contribution = node.getContribution(curi);
- Composite composite = contribution.getArtifactModel("helloworld.composite");
- Component component = composite.getComponents().get(0);
- Service service = component.getImplementation().getServices().get(0);
-
- Assert.assertEquals("helloworld", composite.getName().getLocalPart());
- Assert.assertEquals("HelloworldComponent", component.getName());
- Assert.assertEquals("Helloworld", service.getName());
- }
-
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DirectoryDomainTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DirectoryDomainTestCase.java
deleted file mode 100644
index d89271f14b..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/DirectoryDomainTestCase.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.impl;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.stream.XMLStreamException;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.apache.tuscany.sca.runtime.ActivationException;
-import org.apache.tuscany.sca.runtime.ContributionDescription;
-import org.junit.Test;
-import org.oasisopen.sca.NoSuchDomainException;
-import org.oasisopen.sca.NoSuchServiceException;
-import org.oasisopen.sca.annotation.Remotable;
-
-public class DirectoryDomainTestCase {
-
- @Test
- public void testDefaultDomain() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException, IOException {
- Node node = TuscanyRuntime.newInstance().createNode(new File("src/test/resources/test-domains/default"));
-
- Assert.assertEquals("default", node.getDomainName());
- Assert.assertEquals(1, node.getInstalledContributionURIs().size());
- Assert.assertEquals("sample-helloworld", node.getInstalledContributionURIs().get(0));
- Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
- }
-
- @Test
- public void testMyDomain() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException, IOException {
- Node node = TuscanyRuntime.newInstance().createNode(new File("src/test/resources/test-domains/MyDomain"));
-
- Assert.assertEquals("foo", node.getDomainName());
- Assert.assertEquals(1, node.getInstalledContributionURIs().size());
- Assert.assertEquals("helloworld-contribution", node.getInstalledContributionURIs().get(0));
-
- // validate additional deployable composite
- Map<String, List<String>> scs = node.getStartedCompositeURIs();
- Assert.assertEquals(2, scs.get("helloworld-contribution").size());
- Assert.assertTrue(scs.get("helloworld-contribution").contains("helloworld.composite"));
- Assert.assertTrue(scs.get("helloworld-contribution").contains("helloworld2.composite"));
-
- // validate metadata side file
- ContributionDescription ic = node.getInstalledContribution("helloworld-contribution");
- Assert.assertEquals(1, ic.getJavaExports().size());
- Assert.assertEquals("sample", ic.getJavaExports().get(0));
- }
-
- @Test
- public void testNodeXMLFile() throws ContributionReadException, ActivationException, ValidationException, XMLStreamException, IOException {
- Node node = TuscanyRuntime.newInstance().createNode(new File("src/test/resources/helloworldNode.xml"));
- Assert.assertEquals("helloworld", node.getDomainName());
- List<String> cs = node.getInstalledContributionURIs();
- Assert.assertEquals(1, cs.size());
- Assert.assertEquals("sample-helloworld", cs.get(0));
- Map<String, List<String>> startedComposites = node.getStartedCompositeURIs();
- Assert.assertEquals(1, startedComposites.size());
- Assert.assertEquals("helloworld.composite", startedComposites.get("sample-helloworld").get(0));
- }
-
- @Test
- public void testNodeXMLDomain() throws ContributionReadException, ActivationException, ValidationException, XMLStreamException, IOException {
- Node node = TuscanyRuntime.newInstance().createNode(new File("src/test/resources/test-domains/NodeXMLDomain"));
- Assert.assertEquals("helloworld", node.getDomainName());
- List<String> cs = node.getInstalledContributionURIs();
- Assert.assertEquals(1, cs.size());
- Assert.assertEquals("sample-helloworld", cs.get(0));
- Map<String, List<String>> startedComposites = node.getStartedCompositeURIs();
- Assert.assertEquals(1, startedComposites.size());
- Assert.assertEquals("helloworld.composite", startedComposites.get("sample-helloworld").get(0));
- }
-
- @Test
- public void testExploded() throws ContributionReadException, ActivationException, ValidationException, XMLStreamException, IOException {
- Node node = TuscanyRuntime.newInstance().createNode(new File("src/test/resources/test-domains/exploded"));
- Assert.assertEquals("exploded", node.getDomainName());
- List<String> cs = node.getInstalledContributionURIs();
- Assert.assertEquals(1, cs.size());
- Assert.assertEquals("sample-helloworld", cs.get(0));
- Map<String, List<String>> startedComposites = node.getStartedCompositeURIs();
- Assert.assertEquals(1, startedComposites.size());
- Assert.assertEquals("helloworld.composite", startedComposites.get("sample-helloworld").get(0));
- }
-
- @Test
- public void testDependencies() throws ContributionReadException, ActivationException, ValidationException, XMLStreamException, IOException, NoSuchServiceException {
- Node node = TuscanyRuntime.newInstance().createNode(new File("src/test/resources/test-domains/dependencies"));
- Assert.assertEquals("dependencies", node.getDomainName());
- List<String> cs = node.getInstalledContributionURIs();
- Assert.assertEquals(4, cs.size());
- Assert.assertEquals("Hello 1 Petra", node.getService(TestIface.class, "Helloworld1Component").sayHello("Petra"));
- Assert.assertEquals("Hello 2 Amelia", node.getService(TestIface.class, "Helloworld2Component").sayHello("Amelia"));
- }
-
- @Remotable
- interface TestIface {
- String sayHello(String name);
- }
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/Node2TestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/Node2TestCase.java
deleted file mode 100644
index 04dca98062..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/Node2TestCase.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.impl;
-
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.stream.XMLStreamException;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.apache.tuscany.sca.runtime.ActivationException;
-import org.apache.tuscany.sca.runtime.ContributionDescription;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.oasisopen.sca.NoSuchDomainException;
-import org.oasisopen.sca.NoSuchServiceException;
-
-public class Node2TestCase {
-
- @Test
- public void localInstall() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
- node.installContribution("src/test/resources/import.jar");
-
- Assert.assertEquals(1, node.getInstalledContributionURIs().size());
- Assert.assertEquals("import", node.getInstalledContributionURIs().get(0));
- Contribution c = node.getContribution("import");
- Assert.assertNotNull(c);
- }
-
- @Test
- public void remoteInstall() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
- node.installContribution("http://repository.apache.org/content/groups/snapshots/org/apache/tuscany/sca/samples/helloworld/2.0-SNAPSHOT/helloworld-2.0-SNAPSHOT.jar");
-
- Assert.assertEquals(1, node.getInstalledContributionURIs().size());
- Assert.assertEquals("helloworld", node.getInstalledContributionURIs().get(0));
- Contribution c = node.getContribution("helloworld");
- Assert.assertNotNull(c);
- }
-
- @Ignore("TUSCANY-3953")
- @Test
- public void DistributedInstall() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- TuscanyRuntime runtime = TuscanyRuntime.newInstance();
- try {
- Node nodeA = runtime.createNode("uri:DistributedInstall");
- nodeA.installContribution("http://repository.apache.org/content/groups/snapshots/org/apache/tuscany/sca/samples/helloworld/2.0-SNAPSHOT/helloworld-2.0-SNAPSHOT.jar");
- nodeA.installContribution("src/test/resources/export.jar");
-
- Assert.assertEquals(2, nodeA.getInstalledContributionURIs().size());
- Assert.assertTrue(nodeA.getInstalledContributionURIs().contains("export"));
- Assert.assertTrue(nodeA.getInstalledContributionURIs().contains("helloworld"));
- Contribution cA = nodeA.getContribution("helloworld");
- Assert.assertNotNull(cA);
-
- Node nodeB = runtime.createNode("uri:DistributedInstall");
- Assert.assertEquals(2, nodeB.getInstalledContributionURIs().size());
- Assert.assertTrue(nodeB.getInstalledContributionURIs().contains("export"));
- Assert.assertTrue(nodeB.getInstalledContributionURIs().contains("helloworld"));
- Contribution cB = nodeB.getContribution("helloworld");
- Assert.assertNotNull(cB);
-
- ContributionDescription cd = ((NodeImpl)nodeB).getInstalledContribution("export");
- Assert.assertEquals(1, cd.getJavaExports().size());
- Assert.assertEquals("sample", cd.getJavaExports().get(0));
- } finally {
- runtime.stop();
- }
- }
-
- @Test
- public void deployables() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
- node.installContribution("src/test/resources/import.jar");
-
- Assert.assertEquals(1, node.getInstalledContributionURIs().size());
- Assert.assertEquals("import", node.getInstalledContributionURIs().get(0));
- List<String> ds = node.getDeployableCompositeURIs("import");
- Assert.assertEquals(1, ds.size());
- Assert.assertEquals("helloworld.composite", ds.get(0));
-
- }
-
- @Test
- public void exports() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
- node.installContribution("src/test/resources/export.jar");
-
- Assert.assertEquals(1, node.getInstalledContributionURIs().size());
- Assert.assertEquals("export", node.getInstalledContributionURIs().get(0));
-
- ContributionDescription cd = ((NodeImpl)node).getInstalledContribution("export");
- Assert.assertEquals(1, cd.getJavaExports().size());
- Assert.assertEquals("sample", cd.getJavaExports().get(0));
- }
-
- @Test
- public void validValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
- node.installContribution("src/test/resources/sample-helloworld.jar");
- node.validateContribution("sample-helloworld");
- }
-
- @Test
- public void invalidValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
- node.installContribution("src/test/resources/import.jar");
- try {
- node.validateContribution("import");
- } catch (ValidationException e) {
- Assert.assertTrue(e.getMessage().endsWith("Unresolved import: Import = sample"));
- }
- }
-
- @Test
- public void importExportValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
- node.installContribution("src/test/resources/import.jar");
- try {
- node.validateContribution("import");
- } catch (ValidationException e) {
- // expected
- }
- node.installContribution("src/test/resources/export.jar");
- node.validateContribution("import");
- node.startComposite("import", "helloworld.composite");
- Map<String, List<String>> scs = node.getStartedCompositeURIs();
- Assert.assertEquals(1, scs.size());
- }
-
- @Ignore("TUSCANY-3953")
- @Test
- public void importExportDistributedValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- TuscanyRuntime runtime = TuscanyRuntime.newInstance();
- try {
- Node nodeA = runtime.createNode("uri:ImportTestCase");
- nodeA.installContribution("src/test/resources/import.jar");
- try {
- nodeA.validateContribution("import");
- } catch (ValidationException e) {
- // expected
- }
- Node nodeB =runtime.createNode("uri:ImportTestCase");
- nodeB.installContribution("src/test/resources/export.jar");
- nodeA.validateContribution("import");
- nodeA.startComposite("import", "helloworld.composite");
- Map<String, List<String>> scs = nodeB.getStartedCompositeURIs();
- Assert.assertEquals(1, scs.size());
- }finally {
- runtime.stop();
- }
-
- }
-
- @Test
- public void startTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
- node.installContribution("src/test/resources/sample-helloworld.jar");
- Assert.assertEquals(0, node.getStartedCompositeURIs().size());
-
- node.startComposite("sample-helloworld", "helloworld.composite");
- Assert.assertEquals(1, node.getStartedCompositeURIs().size());
- Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
-
- node.stopComposite("sample-helloworld", "helloworld.composite");
-// Assert.assertEquals(0, node.getStartedComposites().size());
- node.startComposite("sample-helloworld", "helloworld.composite");
- Assert.assertEquals(1, node.getStartedCompositeURIs().size());
- Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
- node.stopComposite("sample-helloworld", "helloworld.composite");
- }
-
- @Ignore("TUSCANY-3953")
- @Test
- public void startDistributedTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, InterruptedException {
- TuscanyRuntime runtime = TuscanyRuntime.newInstance();
- try {
- Node node = runtime.createNode("uri:ImportTestCase");
- Node node2 = runtime.createNode("uri:ImportTestCase");
-
- node.installContribution("src/test/resources/sample-helloworld.jar");
- Assert.assertEquals(1, node.getInstalledContributionURIs().size());
- Assert.assertEquals(1, node2.getInstalledContributionURIs().size());
-
- node.startComposite("sample-helloworld", "helloworld.composite");
- Assert.assertEquals(1, node.getStartedCompositeURIs().size());
- Assert.assertEquals(1, node2.getStartedCompositeURIs().size());
-
- Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
- Assert.assertEquals("helloworld.composite", node2.getStartedCompositeURIs().get("sample-helloworld").get(0));
-
- node.stopComposite("sample-helloworld", "helloworld.composite");
- Assert.assertEquals(0, node.getStartedCompositeURIs().size());
- Assert.assertEquals(0, node2.getStartedCompositeURIs().size());
-
- node2.startComposite("sample-helloworld", "helloworld.composite");
- Assert.assertEquals(1, node.getStartedCompositeURIs().size());
- Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
-
- Assert.assertEquals(1, node2.getStartedCompositeURIs().size());
- Assert.assertEquals("helloworld.composite", node2.getStartedCompositeURIs().get("sample-helloworld").get(0));
-
- } finally {
- runtime.stop();
- }
- }
-
- @Test
- public void addDeploymentCompositeTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException {
- Node node = TuscanyRuntime.newInstance().createNode("addDeploymentCompositeTest");
- String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
-
- String compositeXML =
- "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\""
- + " xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\""
- + " targetNamespace=\"http://test/composite\""
- + " name=\"TestComposite\">"
- + " <component name=\"TestComponent\">"
- + " <implementation.java class=\"sample.HelloworldImpl\"/>"
- + " </component>"
- + "</composite>";
- String compositeURI = node.addDeploymentComposite(curi, new StringReader(compositeXML));
-
- node.startComposite(curi, compositeURI);
- Assert.assertEquals(1, node.getStartedCompositeURIs().size());
-
- Composite dc = node.getDomainComposite();
- Assert.assertEquals(1, dc.getIncludes().size());
- Composite runningComposite = dc.getIncludes().get(0);
- Assert.assertEquals("TestComposite", runningComposite.getName().getLocalPart());
- }
-
- @Test
- public void invalidCompositeStartTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException {
- Node node = TuscanyRuntime.newInstance().createNode("invalidCompositeStartTest");
- String curi = node.installContribution("src/test/resources/helloworld-invalidComposite.jar");
- Assert.assertEquals(1, node.getInstalledContributionURIs().size());
- Assert.assertEquals(0, node.getStartedCompositeURIs().size());
- ContributionDescription cd = node.getInstalledContribution(curi);
- Assert.assertEquals(1, cd.getDeployables().size());
-
- String compositeXML =
- "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\""
- + " xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\""
- + " targetNamespace=\"http://test/composite\""
- + " name=\"TestComposite\">"
- + " <component name=\"TestComponent\">"
- + " <implementation.java class=\"sample.HelloworldImpl\"/>"
- + " </component>"
- + "</composite>";
- String compositeURI = node.addDeploymentComposite(curi, new StringReader(compositeXML));
- node.startComposite(curi, compositeURI);
-
-// node.startComposite("sample-helloworld", "helloworld.composite");
-// Assert.assertEquals(1, node.getStartedCompositeURIs().size());
-// Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
-//
-// node.stopComposite("sample-helloworld", "helloworld.composite");
-//// Assert.assertEquals(0, node.getStartedComposites().size());
-// node.startComposite("sample-helloworld", "helloworld.composite");
-// Assert.assertEquals(1, node.getStartedCompositeURIs().size());
-// Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
-// node.stopComposite("sample-helloworld", "helloworld.composite");
- }
-
- @Test
- public void stopAndUnistallTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException {
- Node node = TuscanyRuntime.newInstance().createNode("stopAndUnistallTest");
- node.installContribution("src/test/resources/import.jar");
- node.installContribution("src/test/resources/export.jar");
- String compositeXML =
- "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\""
- + " xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\""
- + " targetNamespace=\"http://test/composite\""
- + " name=\"TestComposite\">"
- + " <component name=\"TestComponent\">"
- + " <implementation.java class=\"sample.HelloworldImpl\"/>"
- + " </component>"
- + "</composite>";
- String compositeURI = node.addDeploymentComposite("export", new StringReader(compositeXML));
- node.startComposite("import", "helloworld.composite");
- node.startComposite("export", compositeURI);
- Assert.assertEquals(2, node.getInstalledContributionURIs().size());
- node.stopCompositeAndUninstallUnused("import", "helloworld.composite");
- Assert.assertEquals(1, node.getInstalledContributionURIs().size());
- node.stopCompositeAndUninstallUnused("export", compositeURI);
- Assert.assertEquals(0, node.getInstalledContributionURIs().size());
- }
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/UsedCompositesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/UsedCompositesTestCase.java
deleted file mode 100644
index b5c24c4450..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/impl/UsedCompositesTestCase.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.impl;
-
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.util.List;
-
-import javax.xml.stream.XMLStreamException;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.apache.tuscany.sca.runtime.ActivationException;
-import org.junit.Assert;
-import org.junit.Test;
-import org.oasisopen.sca.NoSuchDomainException;
-import org.oasisopen.sca.NoSuchServiceException;
-
-public class UsedCompositesTestCase {
-
- @Test
- public void includeTest1() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException, FileNotFoundException {
- Node node = TuscanyRuntime.newInstance().createNode("localTest");
- String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
- String compositeURI = node.addDeploymentComposite(curi, new FileReader("src/test/resources/include.composite"));
-
- node.startComposite(curi, compositeURI);
-
- List<String> xs = ((NodeImpl)node).updateUsingComposites(curi, "helloworld.composite");
- Assert.assertEquals(1, xs.size());
- Assert.assertEquals("sample-helloworld/include.composite", xs.get(0));
- }
- @Test
- public void implCompositeTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException, FileNotFoundException {
- Node node = TuscanyRuntime.newInstance().createNode("localTest");
- String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
- String compositeURI = node.addDeploymentComposite(curi, new FileReader("src/test/resources/compositeImpl.composite"));
-
- node.startComposite(curi, compositeURI);
-
- List<String> xs = ((NodeImpl)node).updateUsingComposites(curi, "helloworld.composite");
- Assert.assertEquals(1, xs.size());
- Assert.assertEquals("sample-helloworld/compositeImpl.composite", xs.get(0));
- }
-
- @Test
- public void nestedTest1() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException, FileNotFoundException {
- Node node = TuscanyRuntime.newInstance().createNode("NestedTest");
- String curi = node.installContribution("src/test/resources/helloworld2.jar");
-
- node.startComposite(curi, "compositeImpl.composite");
-
- String compositeURI = node.addDeploymentComposite(curi, new FileReader("src/test/resources/nested.composite"));
- node.startComposite(curi, compositeURI);
-
- List<String> xs = ((NodeImpl)node).updateUsingComposites(curi, "helloworld.composite");
- Assert.assertEquals(2, xs.size());
- Assert.assertTrue(xs.contains("helloworld2/compositeImpl.composite"));
- Assert.assertTrue(xs.contains("helloworld2/nested.composite"));
- }
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/ClassLoaderReleaseTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/ClassLoaderReleaseTestCase.java
deleted file mode 100644
index 4488458f5a..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/ClassLoaderReleaseTestCase.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.runtime;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.junit.Test;
-
-public class ClassLoaderReleaseTestCase {
-
- @Test
- public void testInstallDeployable() throws IOException, ActivationException{
- File f = copyFile("src/test/resources/sample-helloworld.jar");
- Node node = TuscanyRuntime.runComposite(null, f.toURI().toURL().toString());
- // this delete should fail on Windows as the jar is locked, but the doesn't seem to happen in 'nix
- boolean b = f.delete();
- if (!b) {
- Map<String, List<String>> scuris = node.getStartedCompositeURIs();
- node.stopCompositeAndUninstallUnused(scuris.keySet().iterator().next(), scuris.get(scuris.keySet().iterator().next()).get(0));
- Assert.assertTrue(f.delete());
- }
- }
-
- private File copyFile(String fileName) throws IOException {
- File f = new File(fileName);
- File newFile = File.createTempFile(getClass().getName(), ".jar");
- InputStream in = new FileInputStream(f);
- OutputStream out = new FileOutputStream(newFile);
- byte[] buf = new byte[1024];
- int len;
- while ((len = in.read(buf)) > 0) {
- out.write(buf, 0, len);
- }
- in.close();
- out.close();
- return newFile;
- }
-
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java
deleted file mode 100644
index f32ff81625..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.runtime;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.deployment.Deployer;
-import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.junit.Test;
-import org.oasisopen.sca.NoSuchDomainException;
-import org.oasisopen.sca.NoSuchServiceException;
-
-public class DeployerTestCase {
-
- @Test
- public void testInstalledContribution() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException {
- TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
- Node node = tuscanyRuntime.createNode("myDomain");
-
- Deployer deployer = tuscanyRuntime.getDeployer();
- Monitor monitor = deployer.createMonitor();
- Contribution contribution = deployer.loadContribution(URI.create("foo"), new File("src/test/resources/sample-helloworld-nodeployable.jar").toURI().toURL(), monitor);
- monitor.analyzeProblems();
-
- node.installContribution(contribution, null);
- List<String> ics = node.getInstalledContributionURIs();
- Assert.assertEquals(1, ics.size());
- Assert.assertEquals("foo", ics.get(0));
- }
-
- @Test
- public void testAddDeploymentComposite() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException, XMLStreamException {
- TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
- Node node = tuscanyRuntime.createNode("myDomain");
-
- node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null);
-
- Deployer deployer = tuscanyRuntime.getDeployer();
- Monitor monitor = deployer.createMonitor();
- Composite composite = deployer.loadXMLDocument(new File("src/test/resources/helloworld2.composite").toURI().toURL(), monitor);
- monitor.analyzeProblems();
- String cmpuri = node.addDeploymentComposite("foo", composite);
- node.startComposite("foo", cmpuri);
- Map<String, List<String>> dcs = node.getStartedCompositeURIs();
- Assert.assertEquals(1, dcs.size());
- Assert.assertEquals("helloworld2.composite", dcs.get("foo").get(0));
- }
-
- @Test
- public void testAddDeploymentCompositeXML() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException, XMLStreamException, FileNotFoundException {
- TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
- Node node = tuscanyRuntime.createNode("myDomain");
-
- node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null);
-
- String cmpuri = node.addDeploymentComposite("foo", new FileReader(new File("src/test/resources/helloworld2.composite")));
- node.startComposite("foo", cmpuri);
- Map<String, List<String>> dcs = node.getStartedCompositeURIs();
- Assert.assertEquals(1, dcs.size());
- Assert.assertEquals("helloworld2.composite", dcs.get("foo").get(0));
- }
-
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DomainCompositeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DomainCompositeTestCase.java
deleted file mode 100644
index a4fbf5fd42..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DomainCompositeTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.runtime;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.xml.Utils;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.impl.NodeImpl;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.oasisopen.sca.NoSuchDomainException;
-import org.oasisopen.sca.NoSuchServiceException;
-
-public class DomainCompositeTestCase {
-
- @Test
- public void localOnlyDomain() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("DomainCompositeTestCase");
- testIt(node);
- }
-
- @Ignore("TUSCANY-3953")
- @Test
- public void distributedDomain() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- TuscanyRuntime runtime = TuscanyRuntime.newInstance();
- try {
- Node node = runtime.createNode("uri:DomainCompositeTestCase");
- testIt(node);
- } finally { runtime.stop(); }
- }
-
- private void testIt(Node node) throws ContributionReadException, ActivationException, ValidationException {
- node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null);
- node.startComposite("helloworld", "helloworld.composite");
-
- Composite dc = node.getDomainComposite();
- Assert.assertEquals("DomainCompositeTestCase", dc.getName().getLocalPart());
- Assert.assertEquals(1, dc.getIncludes().size());
- Composite c = dc.getIncludes().get(0);
- Assert.assertEquals("helloworld", c.getName().getLocalPart());
-
-// String s = node.getDomainLevelCompositeAsString();
- System.out.println(Utils.modelToXML(node.getDomainComposite(), true, ((NodeImpl)node).getExtensionPointRegistry()));
-// Assert.assertTrue(s.contains(":helloworld\""));
-
- node.stopComposite("helloworld", "helloworld.composite");
- Assert.assertEquals(0, node.getDomainComposite().getIncludes().size());
- }
-
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DynamicTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DynamicTestCase.java
deleted file mode 100644
index f05771e129..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DynamicTestCase.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.runtime;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import javax.xml.namespace.QName;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.Component;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.FactoryExtensionPoint;
-import org.apache.tuscany.sca.implementation.java.IntrospectionException;
-import org.apache.tuscany.sca.implementation.java.JavaImplementation;
-import org.apache.tuscany.sca.implementation.java.JavaImplementationFactory;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.junit.Test;
-import org.oasisopen.sca.NoSuchDomainException;
-import org.oasisopen.sca.NoSuchServiceException;
-
-/**
- * Shows how to create and run composites dynamically
- */
-public class DynamicTestCase {
-
- @Test
- public void testInstalledContribution() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException, ClassNotFoundException, IntrospectionException, IllegalArgumentException, InvocationTargetException,
- IllegalAccessException {
-
- // get the various factories that will be needed
- TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
- ExtensionPointRegistry extensionPoints = tuscanyRuntime.getExtensionPointRegistry();
- FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
-
- // Create a contribution
- ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
- Contribution contribution = contributionFactory.createContribution();
- contribution.setURI("testContribution");
- ModelResolverExtensionPoint modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
- ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories);
- contribution.setModelResolver(modelResolver);
- contribution.setClassLoader(new URLClassLoader(new URL[] {new File("src/test/resources/sample-helloworld.jar").toURI().toURL()}));
-
- // Create a composite
- AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
- Composite composite = assemblyFactory.createComposite();
- composite.setURI("testComposite");
- composite.setName(new QName("testComposite"));
-
- // create a component
- Component component = assemblyFactory.createComponent();
- component.setName("testComponent");
- JavaImplementationFactory javaImplementationFactory = modelFactories.getFactory(JavaImplementationFactory.class);
- JavaImplementation javaImplementation = javaImplementationFactory.createJavaImplementation(contribution.getClassLoader().loadClass("sample.HelloworldImpl"));
- javaImplementation.setJavaClass(contribution.getClassLoader().loadClass("sample.HelloworldImpl"));
- component.setImplementation(javaImplementation);
-
- // add the component to the composite
- composite.getComponents().add(component);
-
- // add the composite to the contribution
- contribution.addComposite(composite);
-
- // Now run the composite with a Tuscany Node
- Node node = tuscanyRuntime.createNode();
- node.installContribution(contribution, null);
- node.startComposite(contribution.getURI(), composite.getURI());
-
- // test that the service has started and can be invoked
- testService(node, contribution.getClassLoader());
-
- node.stop();
- tuscanyRuntime.stop();
- }
-
- private void testService(Node node, ClassLoader classLoader) throws ClassNotFoundException, NoSuchServiceException, NoSuchDomainException, IllegalArgumentException, InvocationTargetException, IllegalAccessException {
- Class<?> interfaze = classLoader.loadClass("sample.Helloworld");
- Object clientProxy = node.getService(interfaze, "testComponent/Helloworld");
- Method m = interfaze.getMethods()[0]; // the helloworld interface just has a single method "sayHello"
- Object response = m.invoke(clientProxy, new Object[] {"Ariana"});
- Assert.assertEquals("Hello Ariana", response);
- }
-
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java
deleted file mode 100644
index c7041fa5b4..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.runtime;
-
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.junit.Test;
-
-public class NodeXMLTestCase {
-
- @Test
- public void testHelloworldXML() throws ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNodeFromXML("src/test/resources/helloworldNode.xml");
- Assert.assertEquals("helloworld", node.getDomainName());
- List<String> cs = node.getInstalledContributionURIs();
- Assert.assertEquals(1, cs.size());
- Assert.assertEquals("sample-helloworld", cs.get(0));
- Map<String, List<String>> startedComposites = node.getStartedCompositeURIs();
- Assert.assertEquals(1, startedComposites.size());
- Assert.assertEquals("helloworld.composite", startedComposites.get("sample-helloworld").get(0));
- }
-
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/PerfTest.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/PerfTest.java
deleted file mode 100644
index 97b3755f2e..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/PerfTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.runtime;
-
-import java.util.Properties;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.junit.Test;
-import org.oasisopen.sca.NoSuchDomainException;
-import org.oasisopen.sca.NoSuchServiceException;
-
-import sample.Helloworld;
-
-public class PerfTest {
-
- @Test
- public void testStopStart() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Properties config = new Properties();
- config.setProperty(RuntimeProperties.QUIET_LOGGING, "true");
- Node node = TuscanyRuntime.newInstance(config).createNode();
- node.installContribution(null, "src/test/resources/sample-helloworld.jar", null, null);
-
- validate(node);
-
- int count = 3000;
- long start = System.currentTimeMillis();
- for (int i=0; i<count; i++) {
- node.startComposite("sample-helloworld", "helloworld.composite");
- node.stopComposite("sample-helloworld", "helloworld.composite");
- }
- long total = System.currentTimeMillis() - start;
- System.out.println(count + " = " + total + " = " + total / (double)count);
-
- // test it still works
- validate(node);
- }
-
- private void validate(Node node) throws ActivationException, ValidationException, NoSuchServiceException, ContributionReadException {
- node.startComposite("sample-helloworld", "helloworld.composite");
-
- Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
- Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
-
- node.stopComposite("sample-helloworld", "helloworld.composite");
- try {
- node.getService(Helloworld.class, "HelloworldComponent");
- Assert.fail();
- } catch (NoSuchServiceException e) {
- // expected as there is no deployables
- }
- }
-
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java
deleted file mode 100644
index 27292bbc08..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.runtime;
-
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.oasisopen.sca.NoSuchDomainException;
-import org.oasisopen.sca.NoSuchServiceException;
-
-import sample.Helloworld;
-
-public class TuscanyRuntimeTestCase {
-
- @Test
- public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("default");
- node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null);
- node.startComposite("helloworld", "helloworld.composite");
-
- Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
- Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
- }
-
- @Test
- public void testStopStart() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("default");
- node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null);
- node.startComposite("helloworld", "helloworld.composite");
-
- Map<String, List<String>> ci = node.getStartedCompositeURIs();
- Assert.assertEquals(1, ci.size());
-
- Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
- Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
-
- node.stopComposite("helloworld", "helloworld.composite");
- try {
- node.getService(Helloworld.class, "HelloworldComponent");
- Assert.fail();
- } catch (NoSuchServiceException e) {
- // expected as there is no deployables
- }
-
- node.startComposite("helloworld", "helloworld.composite");
- helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
- Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
- }
-
- @Test
- @Ignore("Depdends on itest/T3558 which isn't in the build?")
- public void testInstallWithDependent() throws NoSuchServiceException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("default");
- node.installContribution("store", "../../testing/itest/T3558/src/test/resources/sample-store.jar", null, null);
- node.installContribution("store-client", "../../testing/itest/T3558/src/test/resources/sample-store-client.jar", null, null);
- node.startComposite("store", "store.composite");
- node.startComposite("store-client", "store-client.composite");
-
- Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
- Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
- }
-
- @Test
- public void testInstallNoDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("default");
- node.installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", null, null);
-
- try {
- node.getService(Helloworld.class, "HelloworldComponent");
- Assert.fail();
- } catch (NoSuchServiceException e) {
- // expected as there is no deployables
- }
-
- node.startComposite("helloworld", "helloworld.composite");
- Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
- Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
- }
-
- @Test
- public void testGetInstalledContributions() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("default");
- node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null);
- List<String> ics = node.getInstalledContributionURIs();
- Assert.assertEquals(1, ics.size());
- Assert.assertEquals("foo", ics.get(0));
- }
-
- @Test
- public void testGetDeployedCompostes() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("default");
- node.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null);
- List<String> dcs = node.startDeployables("foo");
- Assert.assertEquals(1, dcs.size());
- Assert.assertEquals("helloworld.composite", dcs.get(0));
- }
-
- @Test
- public void testRemoveComposte() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("default");
- node.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null);
- List<String> dcs = node.startDeployables("foo");
- Assert.assertEquals(1, dcs.size());
- Map<String, List<String>> dcsx = node.getStartedCompositeURIs();
- Assert.assertEquals(1, dcsx.size());
- node.stopComposite("foo", "helloworld.composite");
- dcsx = node.getStartedCompositeURIs();
- Assert.assertEquals(0, dcsx.size());
- }
-
- @Test
- public void testInstallWithMetaData() throws ContributionReadException, ActivationException, ValidationException, NoSuchServiceException {
- Node node = TuscanyRuntime.newInstance().createNode("default");
- node.installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", "src/test/resources/sca-contribution-generated.xml", null);
- node.startComposite("helloworld", "helloworld.composite");
-
- Map<String, List<String>> dcs = node.getStartedCompositeURIs();
- Assert.assertEquals(1, dcs.size());
- Assert.assertEquals("helloworld.composite", dcs.get("helloworld").get(0));
-
- Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
- Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
- }
-
- @Test
- public void testURI() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- Node node = TuscanyRuntime.newInstance().createNode("default");
- String uri = node.installContribution("src/test/resources/sample-helloworld.jar");
- Assert.assertEquals("sample-helloworld", uri);
- }
-
- @Test
- public void testStaticCreate() {
- Node node = TuscanyRuntime.runComposite("helloworld.composite", "src/test/resources/sample-helloworld.jar");
- List<String> cs = node.getInstalledContributionURIs();
- Assert.assertEquals(1, cs.size());
- Map<String, List<String>> dcs = node.getStartedCompositeURIs();
- Assert.assertEquals(1, dcs.size());
- Assert.assertEquals("helloworld.composite", dcs.get("sample-helloworld").get(0));
- }
-
- @Test
- public void testStaticCreateWithNullComposite() {
- Node node = TuscanyRuntime.runComposite(null, "src/test/resources/sample-helloworld.jar");
- List<String> cs = node.getInstalledContributionURIs();
- Assert.assertEquals(1, cs.size());
- Map<String, List<String>> dcs = node.getStartedCompositeURIs();
- Assert.assertEquals(1, dcs.size());
- Assert.assertEquals("helloworld.composite", dcs.get("sample-helloworld").get(0));
- }
- @Test
- public void testRunComposite() throws NoSuchServiceException {
- Node node = TuscanyRuntime.runComposite("helloworld.composite", "src/test/resources/sample-helloworld.jar");
- Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
- Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
- }
-
- @Test
- public void testRunCompositeSharedRuntime() throws NoSuchServiceException {
- Node node = TuscanyRuntime.runComposite(URI.create("default"), "helloworld.composite", "src/test/resources/sample-helloworld.jar");
- Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
- Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
- }
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java
deleted file mode 100644
index 9c5a702d78..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sca.runtime;
-
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.Node;
-import org.apache.tuscany.sca.TuscanyRuntime;
-import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.monitor.ValidationException;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.oasisopen.sca.NoSuchDomainException;
-import org.oasisopen.sca.NoSuchServiceException;
-
-import sample.Helloworld;
-
-@Ignore("TUSCANY-3953")
-public class TwoNodesTestCase {
-
- @Test
- public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
- TuscanyRuntime runtime = TuscanyRuntime.newInstance();
- try {
- Node node1 = runtime.createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44331");
- node1.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null);
- node1.startComposite("helloworld", "helloworld.composite");
-
- Node node2 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44332&wka=127.0.0.1:44331");
-
- Helloworld helloworldService = node2.getService(Helloworld.class, "HelloworldComponent");
- Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
- } finally { runtime.stop(); }
- }
-
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/sample/Helloworld.java
deleted file mode 100644
index b67efbb485..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/java/sample/Helloworld.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package sample;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-@Remotable
-public interface Helloworld {
- String sayHello(String name);
-}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/compositeImpl.composite b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/compositeImpl.composite
deleted file mode 100644
index 735bf3bbcc..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/compositeImpl.composite
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:sample="http://sample"
- targetNamespace="http://sample"
- name="compositeImpl">
-
- <component name="Helloworld2Component">
- <implementation.composite name="sample:helloworld"/>
- </component>
-
-</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/export.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/export.jar
deleted file mode 100644
index 0ca3450bed..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/export.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld-invalidComposite.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld-invalidComposite.jar
deleted file mode 100644
index fa35a21696..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld-invalidComposite.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld2.composite b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld2.composite
deleted file mode 100644
index 8c7a789380..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld2.composite
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://sample"
- name="helloworld2">
-
- <component name="Helloworld2Component">
- <implementation.java class="sample.HelloworldImpl"/>
- </component>
-
-</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld2.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld2.jar
deleted file mode 100644
index 2f8e473cd0..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworld2.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworldNode.xml b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworldNode.xml
deleted file mode 100644
index ea2f577139..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/helloworldNode.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- domain="helloworld">
-
- <contribution location="sample-helloworld.jar" startDeployables="true" />
-
-</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/import.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/import.jar
deleted file mode 100644
index 4931074878..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/import.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/include.composite b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/include.composite
deleted file mode 100644
index a1d9a658be..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/include.composite
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:sample="http://sample"
- targetNamespace="http://sample"
- name="include">
-
- <include name="sample:helloworld" />
-
-</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar
deleted file mode 100644
index 7f6073ce7f..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar
deleted file mode 100644
index 2306ce4d1a..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/nested.composite b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/nested.composite
deleted file mode 100644
index 1c31941a83..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/nested.composite
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:sample="http://sample"
- targetNamespace="http://sample"
- name="nested">
-
- <include name="sample:compositeImpl" />
-
-</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld-nodeployable.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld-nodeployable.jar
deleted file mode 100644
index 16dde03858..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld-nodeployable.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld.jar
deleted file mode 100644
index 1ea85c8e63..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld2.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld2.jar
deleted file mode 100644
index 80b8b2315f..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sample-helloworld2.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sca-contribution-generated.xml b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sca-contribution-generated.xml
deleted file mode 100644
index 8e20561dc3..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/sca-contribution-generated.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:sample="http://sample">
- <deployable composite="sample:helloworld"/>
-</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/domain.properties b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/domain.properties
deleted file mode 100644
index d7ac22d6ad..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/domain.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-domainName=foo
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.deployable.composite b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.deployable.composite
deleted file mode 100644
index 8c7a789380..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.deployable.composite
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://sample"
- name="helloworld2">
-
- <component name="Helloworld2Component">
- <implementation.java class="sample.HelloworldImpl"/>
- </component>
-
-</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.jar
deleted file mode 100644
index 5198370d85..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.xml
deleted file mode 100644
index 2788e14022..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/helloworld-contribution.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:sample="http://sample">
- <export.java package="sample" />
-</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/readme.txt b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/readme.txt
deleted file mode 100644
index 10114926c4..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/MyDomain/readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-A file named domain.properties is used to override the domain name, see in the properties file for what
-other properties are supportted.
-
-Side files are used to modify the helloworld-contribution.jar installed contribution.
-- sca-contribution.xml metaData is modified by having a metaData side file named helloworld-contribution.xml
-- additional deployment composites are added with files named helloworld-contribution.<anything>.composite
-
-
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/NodeXMLDomain/node.xml b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/NodeXMLDomain/node.xml
deleted file mode 100644
index 1fe1ccff14..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/NodeXMLDomain/node.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- domain="helloworld">
-
- <contribution location="../../sample-helloworld.jar" startDeployables="true" />
-
-</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/NodeXMLDomain/readme.txt b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/NodeXMLDomain/readme.txt
deleted file mode 100644
index 15dac7bd0c..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/NodeXMLDomain/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-The domain directory gets all its config from a config XML file named node.xml,
-which may refer to contributions at another location outside of the directory. \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/default/readme.txt b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/default/readme.txt
deleted file mode 100644
index 34b3e347ff..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/default/readme.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-The simplest domain. Just a directory of contrbutions,
-the domain is named with the directory name an the contributions
-are installed and all deployables are started.
- \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/default/sample-helloworld.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/default/sample-helloworld.jar
deleted file mode 100644
index 1ea85c8e63..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/default/sample-helloworld.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/export1.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/export1.jar
deleted file mode 100644
index b2755b65c5..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/export1.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/export2.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/export2.jar
deleted file mode 100644
index eec5ded5ee..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/export2.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import1.dependencies b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import1.dependencies
deleted file mode 100644
index b7c54895d0..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import1.dependencies
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
- export1
-
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import1.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import1.jar
deleted file mode 100644
index 8402f6e3c3..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import1.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import2.dependencies b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import2.dependencies
deleted file mode 100644
index dd3052994c..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import2.dependencies
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-export2
-
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import2.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import2.jar
deleted file mode 100644
index 6667994eb6..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/import2.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/readme.txt b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/readme.txt
deleted file mode 100644
index fc645c0682..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/dependencies/readme.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Uses the domain.properties file to show explicitly defining a contrbutions dependent contribution URIS.
-
-Contributions export1.jar and export2.jar both export the Java package "sample" and both have
-a class sample.HelloworldImpl but the classes return a sayHello string "Hello 1" in export1.jar
-and "Hello 2" in export2.jar.
-
-Contributions import1.jar and import2.jar both import the package sample and use the
-sample.HelloworldImpl class in the component implementation.
-
-The *.dependencies files explicitly set the dependency URIs used by
-Contributions import1.jar and import2.jar, without the explicit property the imports would just t
-use the first contribution found that exports the sample package.
-
-See section 10.2.1 and 10.4 in the Assembly spec.
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/readme.txt b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/readme.txt
deleted file mode 100644
index ea7af2b3f7..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/readme.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-A domain directory showing a contribution jar exploded into a contribution directory.
-In this case the contribution jar is ignored and the contribution directory is used.
-Thats the same approach used for things like Tomcat with exploded webapps and it
-enables more easily supporting dynamic updates to individual files in a contribution. \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld.jar b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld.jar
deleted file mode 100644
index 1ea85c8e63..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld.jar
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/MANIFEST.MF
deleted file mode 100644
index c5d7d06f98..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Archiver-Version: Plexus Archiver
-Created-By: Apache Maven
-Built-By: ant
-Build-Jdk: 1.6.0_18
-Extension-Name: sample-helloworld
-Implementation-Title: Apache Tuscany SCA Sample Helloworld
-Implementation-Vendor: The Apache Software Foundation
-Implementation-Vendor-Id: org.apache
-Implementation-Version: 2.0-SNAPSHOT
-Specification-Title: Apache Tuscany SCA Sample Helloworld
-Specification-Vendor: The Apache Software Foundation
-Specification-Version: 2.0-SNAPSHOT
-
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.properties b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.properties
deleted file mode 100644
index ff83691757..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-#Generated by Maven
-#Wed May 19 10:03:09 BST 2010
-version=2.0-SNAPSHOT
-groupId=org.apache.tuscany.sca
-artifactId=sample-helloworld
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.xml
deleted file mode 100644
index e480d4f534..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <packaging>jar</packaging>
- <artifactId>sample-helloworld</artifactId>
- <name>Apache Tuscany SCA Sample Helloworld</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>${artifactId}</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.tuscany.maven.plugins</groupId>
- <artifactId>maven-tuscany-plugin</artifactId>
- <version>2.0-SNAPSHOT</version>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/sca-contribution.xml
deleted file mode 100644
index e81e94d9a1..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/sca-contribution.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:sample="http://sample">
- <deployable composite="sample:helloworld"/>
- <export.java package="sample" />
-</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/helloworld.composite
deleted file mode 100644
index 324395c246..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/helloworld.composite
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://sample"
- name="helloworld">
-
- <component name="HelloworldComponent">
- <implementation.java class="sample.HelloworldImpl"/>
- </component>
-
-</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/sample/Helloworld.class b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/sample/Helloworld.class
deleted file mode 100644
index 19c82db88e..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/sample/Helloworld.class
+++ /dev/null
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/sample/HelloworldImpl.class b/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/sample/HelloworldImpl.class
deleted file mode 100644
index 575b3370c4..0000000000
--- a/sca-java-2.x/tags/2.0.1-RC1/modules/domain-node/src/test/resources/test-domains/exploded/sample-helloworld/sample/HelloworldImpl.class
+++ /dev/null
Binary files differ