Author: lresende
Date: Fri Feb 29 16:44:53 2008
New Revision: 632516

URL: http://svn.apache.org/viewvc?rev=632516&view=rev
Log:
Resource import/export iTests

Added:
    incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/
    
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/pom.xml
   (with props)
    
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/
    
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/
    
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/java/
    
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/
    
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/
    
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml
   (with props)
    
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/
    
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html
   (with props)
    
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/test/
    
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/test/java/
    incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/pom.xml
   (with props)
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/java/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml
   (with props)
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/store.composite
   (with props)
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/
    
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java
   (with props)

Added: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/pom.xml?rev=632516&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/pom.xml
 (added)
+++ 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/pom.xml
 Fri Feb 29 16:44:53 2008
@@ -0,0 +1,31 @@
+<?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-itest</artifactId>
+        <version>1.2-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>itest-contribution-export-resource</artifactId>
+    <name>Apache Tuscany SCA Contribution Resource Export Integration 
Tests</name>
+
+</project>

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml?rev=632516&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml
 (added)
+++ 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml
 Fri Feb 29 16:44:53 2008
@@ -0,0 +1,24 @@
+<?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://www.osoa.org/xmlns/sca/1.0";
+                 targetNamespace="http://store";
+              xmlns:helloworld="http://store";>
+       <export.resource uri="ufservices/store.html"/>
+</contribution>
\ No newline at end of file

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html?rev=632516&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html
 (added)
+++ 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html
 Fri Feb 29 16:44:53 2008
@@ -0,0 +1,27 @@
+<!--
+    * 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.    
+-->
+<html>
+<head>
+<title>Store</TITLE>
+</head>
+
+<body>
+<h1>Sample Store Page</h1>
+</body>
+</html>

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/pom.xml?rev=632516&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/pom.xml
 (added)
+++ 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/pom.xml
 Fri Feb 29 16:44:53 2008
@@ -0,0 +1,95 @@
+<?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-itest</artifactId>
+        <version>1.2-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>itest-contribution-import-resource</artifactId>
+    <name>Apache Tuscany SCA Contribution Resource Import Java Integration 
Tests</name>
+
+<dependencies>
+       
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>itest-contribution-export-resource</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-http</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-http</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-resource</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+               
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+                               
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-tomcat</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+</project>

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml?rev=632516&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml
 (added)
+++ 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml
 Fri Feb 29 16:44:53 2008
@@ -0,0 +1,25 @@
+<?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://www.osoa.org/xmlns/sca/1.0";
+                 targetNamespace="http://store";
+              xmlns:store="http://store";>
+   <deployable composite="store:store"/>
+   <import.resource uri="ufservices/store.html"/>
+</contribution>
\ No newline at end of file

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/store.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/store.composite?rev=632516&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/store.composite
 (added)
+++ 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/store.composite
 Fri Feb 29 16:44:53 2008
@@ -0,0 +1,33 @@
+<?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://www.osoa.org/xmlns/sca/1.0";
+    xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0";
+       targetNamespace="http://store";
+       xmlns:helloworld="http://store";
+    name="store">
+
+    <component name="store">
+        <tuscany:implementation.resource location="ufservices/store.html"/>
+        <service name="Resource">
+               <tuscany:binding.http uri="http://127.0.0.1:8085"/> 
+        </service>
+    </component>
+
+</composite>

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/store.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/store.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/main/resources/store.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java?rev=632516&view=auto
==============================================================================
--- 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java
 (added)
+++ 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java
 Fri Feb 29 16:44:53 2008
@@ -0,0 +1,129 @@
+/*
+ * 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.test.contribution;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.Socket;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+
+/**
+ * Tests that the helloworld server is available
+ */
+public class StoreTestCase extends TestCase {
+    private ClassLoader cl;
+    private EmbeddedSCADomain domain;
+    private Contribution storeContribution;
+    private Contribution resourceContribution;
+
+    @Override
+    protected void setUp() throws Exception {
+        //Create a test embedded SCA domain
+        cl = getClass().getClassLoader();
+        domain = new EmbeddedSCADomain(cl, "http://localhost";);
+
+        //Start the domain
+        domain.start();
+
+        // Contribute the SCA contribution
+        ContributionService contributionService = 
domain.getContributionService();
+
+        URL javaContribURL = getContributionURL(cl, "ufservices/store.html");
+        resourceContribution = 
contributionService.contribute("http://import-export/export-resource";, 
javaContribURL, false);
+        for (Composite deployable : resourceContribution.getDeployables()) {
+            domain.getDomainComposite().getIncludes().add(deployable);
+            domain.buildComposite(deployable);
+        }
+
+        URL storeContributionURL = getContributionURL(cl, "store.composite");
+
+        storeContribution =
+            contributionService.contribute("http://import-export/store";, 
storeContributionURL, false);
+        for (Composite deployable : storeContribution.getDeployables()) {
+            domain.getDomainComposite().getIncludes().add(deployable);
+            domain.buildComposite(deployable);
+        }
+
+        // Start Components from my composite
+        for (Composite deployable : storeContribution.getDeployables()) {
+            domain.getCompositeActivator().activate(deployable);
+            domain.getCompositeActivator().start(deployable);
+        }
+    }
+
+    public void testPing() throws IOException {
+       new Socket("127.0.0.1", 8085);
+    }
+
+
+    @Override
+    public void tearDown() throws Exception {
+        ContributionService contributionService = 
domain.getContributionService();
+
+        // Remove the contribution from the in-memory repository
+        contributionService.remove("http://import-export/store";);
+        contributionService.remove("http://import-export/export-resource";);
+
+        // Stop Components from my composite
+        for (Composite deployable : storeContribution.getDeployables()) {
+            domain.getCompositeActivator().stop(deployable);
+            domain.getCompositeActivator().deactivate(deployable);
+        }
+
+        domain.stop();
+
+        domain.close();
+    }
+
+    
+    /**
+     * Utility methods
+     */
+    
+
+    private URL getContributionURL(ClassLoader cl, Class<?> cls) throws 
MalformedURLException {
+        String flag = "/" + cls.getName().replace('.', '/') + ".class";
+        URL url = cl.getResource(flag);
+        String root = url.toExternalForm();
+        root = root.substring(0, root.length() - flag.length() + 1);
+        if (root.startsWith("jar:") && root.endsWith("!/")) {
+            root = root.substring(4, root.length() - 2);
+        }
+        url = new URL(root);
+        return url;
+    }
+    
+    private URL getContributionURL(ClassLoader cl, String uri) throws 
MalformedURLException {
+        URL url = cl.getResource(uri);
+        String root = url.toExternalForm();
+        root = root.substring(0, root.length() - uri.length());
+        if (root.startsWith("jar:") && root.endsWith("!/")) {
+            root = root.substring(4, root.length() - 2);
+        }
+        url = new URL(root);
+        return url;
+    }        
+}

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/java/sca/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to