tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r828787 - in /tuscany/java/sca: itest/scdl/ itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ modules/ modules/scdl/
Date Thu, 22 Oct 2009 17:12:06 GMT
Author: rfeng
Date: Thu Oct 22 17:12:05 2009
New Revision: 828787

URL: http://svn.apache.org/viewvc?rev=828787&view=rev
Log:
Remove tuscany-scdl module as it is now replaced by tuscany-deployment
Adjust itest-scdl to use the Deployer from tuscany-deployment

Removed:
    tuscany/java/sca/modules/scdl/
Modified:
    tuscany/java/sca/itest/scdl/pom.xml
    tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java
    tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java
    tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java
    tuscany/java/sca/modules/pom.xml

Modified: tuscany/java/sca/itest/scdl/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/scdl/pom.xml?rev=828787&r1=828786&r2=828787&view=diff
==============================================================================
--- tuscany/java/sca/itest/scdl/pom.xml (original)
+++ tuscany/java/sca/itest/scdl/pom.xml Thu Oct 22 17:12:05 2009
@@ -32,11 +32,31 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-scdl</artifactId>
+            <artifactId>tuscany-deployment</artifactId>
             <version>2.0-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-jsonp</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-rmi</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>                
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-jms</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>        
     </dependencies>
-
+    
     <build>
        <plugins>
           <!-- Copy all the dependencies so the test can verify only the expected ones
get dragged in -->

Modified: tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java?rev=828787&r1=828786&r2=828787&view=diff
==============================================================================
--- tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java
(original)
+++ tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java
Thu Oct 22 17:12:05 2009
@@ -19,6 +19,9 @@
 
 package org.apache.tuscany.sca.itest.scdl;
 
+import java.io.File;
+import java.net.URL;
+import java.util.Arrays;
 import java.util.List;
 
 import junit.framework.Assert;
@@ -28,8 +31,10 @@
 import org.apache.tuscany.sca.assembly.Implementation;
 import org.apache.tuscany.sca.assembly.Reference;
 import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.deployment.DefaultDeployer;
+import org.apache.tuscany.sca.deployment.Deployer;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
-import org.apache.tuscany.sca.scdl.SCDLUtils;
+import org.apache.tuscany.sca.monitor.Monitor;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -41,7 +46,12 @@
 
     @Test
     public void testRead() throws Exception {
-        Contribution contribution = SCDLUtils.readContribution("../../samples/calculator/target/sample-calculator.jar");
+        Deployer deployer = new DefaultDeployer();
+        File file = new File("../../samples/calculator/target/sample-calculator.jar");
+        URL url = file.toURI().toURL();
+        Monitor monitor = deployer.createMonitor();
+        Contribution contribution = deployer.loadContribution(url.toURI(), url, monitor);
+        deployer.build(Arrays.asList(contribution), null, monitor);
         
         // Ferkle around in the contribution verifying it looks as expected
         Assert.assertNotNull(contribution);

Modified: tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java?rev=828787&r1=828786&r2=828787&view=diff
==============================================================================
--- tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java
(original)
+++ tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java
Thu Oct 22 17:12:05 2009
@@ -19,7 +19,7 @@
 
 package org.apache.tuscany.sca.itest.scdl;
 
-import java.io.InputStream;
+import java.net.URL;
 
 import javax.xml.stream.XMLStreamException;
 
@@ -32,7 +32,10 @@
 import org.apache.tuscany.sca.binding.jsonp.JSONPBinding;
 import org.apache.tuscany.sca.binding.rmi.RMIBinding;
 import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
-import org.apache.tuscany.sca.scdl.SCDLUtils;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
+import org.apache.tuscany.sca.deployment.Deployer;
 import org.junit.Test;
 
 /**
@@ -42,8 +45,11 @@
 
     @Test
     public void testRead() throws ContributionReadException, XMLStreamException {
-        InputStream r = getClass().getClassLoader().getResourceAsStream("test.composite");
-        Composite composite = SCDLUtils.readComposite(r);
+        ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+        Deployer deployer = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(Deployer.class);
+        
+        URL r = getClass().getResource("/test.composite");
+        Composite composite = deployer.loadXMLDocument(r, null);
         Assert.assertNotNull(composite);
 
         Component JavaComp = composite.getComponent("JavaComponent");

Modified: tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java?rev=828787&r1=828786&r2=828787&view=diff
==============================================================================
--- tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java
(original)
+++ tuscany/java/sca/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java
Thu Oct 22 17:12:05 2009
@@ -68,6 +68,6 @@
         Assert.assertTrue(dependenciesDir.exists());
         
         File[] dependencyFiles = dependenciesDir.listFiles();
-        Assert.assertEquals(25, dependencyFiles.length);
+        Assert.assertEquals(20, dependencyFiles.length);
     }
 }

Modified: tuscany/java/sca/modules/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/pom.xml?rev=828787&r1=828786&r2=828787&view=diff
==============================================================================
--- tuscany/java/sca/modules/pom.xml (original)
+++ tuscany/java/sca/modules/pom.xml Thu Oct 22 17:12:05 2009
@@ -98,10 +98,9 @@
         <module>policy-logging</module>
         <module>sca-api</module>
         <module>sca-client-impl</module>
-        <module>scdl</module>
         <module>stripes</module>
         <module>xsd</module>
-        <!-- OSGi RFC 119 -->
+        <!-- OSGi Remote Services with SCA -->
         <module>contribution-osgi</module>
         <module>implementation-osgi</module>
         <module>implementation-osgi-runtime</module>



Mime
View raw message