From a3c48da9bb8971497d414f86e352123d95b9c3da Mon Sep 17 00:00:00 2001 From: lresende Date: Fri, 20 Nov 2009 23:53:35 +0000 Subject: Moving 2.x trunk git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@882795 13f79535-47bb-0310-9956-ffa450edef68 --- .../itest/distribution/bin-distro-unzip/build.xml | 24 --- .../itest/distribution/bin-distro-unzip/pom.xml | 128 ------------ .../distribution/binding-ws-calculator/build.xml | 40 ---- .../distribution/binding-ws-calculator/pom.xml | 64 ------ .../itest/distribution/calculator-rmi/build.xml | 51 ----- java/sca/itest/distribution/calculator-rmi/pom.xml | 63 ------ .../implementation-java-calculator/build.xml | 40 ---- .../implementation-java-calculator/pom.xml | 82 -------- java/sca/itest/distribution/legal-checks/pom.xml | 42 ---- .../src/test/java/itest/JarsInLICENSETestCase.java | 162 ---------------- java/sca/itest/distribution/pom.xml | 50 ----- .../distribution/webapp-helloworld-bpel/pom.xml | 124 ------------ .../src/test/java/itest/HelloworldTestCase.java | 50 ----- .../distribution/webapp-helloworld-jms/pom.xml | 216 --------------------- .../src/test/java/itest/HelloworldTestCase.java | 51 ----- .../webapp-helloworld-js-client/pom.xml | 188 ------------------ .../src/test/java/itest/HelloworldTestCase.java | 75 ------- .../distribution/webapp-helloworld-jsf/pom.xml | 130 ------------- .../test/java/itest/HelloworldTestCaseFIXME.java | 71 ------- .../distribution/webapp-helloworld-jsp/pom.xml | 188 ------------------ .../src/test/java/itest/HelloworldTestCase.java | 50 ----- .../distribution/webapp-helloworld-servlet/pom.xml | 188 ------------------ .../src/test/java/itest/HelloworldTestCase.java | 60 ------ .../distribution/webapp-helloworld-stripes/pom.xml | 124 ------------ .../src/test/java/itest/HelloworldTestCase.java | 53 ----- .../itest/distribution/webapp-helloworld/pom.xml | 121 ------------ 26 files changed, 2435 deletions(-) delete mode 100644 java/sca/itest/distribution/bin-distro-unzip/build.xml delete mode 100644 java/sca/itest/distribution/bin-distro-unzip/pom.xml delete mode 100644 java/sca/itest/distribution/binding-ws-calculator/build.xml delete mode 100644 java/sca/itest/distribution/binding-ws-calculator/pom.xml delete mode 100644 java/sca/itest/distribution/calculator-rmi/build.xml delete mode 100644 java/sca/itest/distribution/calculator-rmi/pom.xml delete mode 100644 java/sca/itest/distribution/implementation-java-calculator/build.xml delete mode 100644 java/sca/itest/distribution/implementation-java-calculator/pom.xml delete mode 100644 java/sca/itest/distribution/legal-checks/pom.xml delete mode 100644 java/sca/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java delete mode 100644 java/sca/itest/distribution/pom.xml delete mode 100644 java/sca/itest/distribution/webapp-helloworld-bpel/pom.xml delete mode 100644 java/sca/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java delete mode 100644 java/sca/itest/distribution/webapp-helloworld-jms/pom.xml delete mode 100644 java/sca/itest/distribution/webapp-helloworld-jms/src/test/java/itest/HelloworldTestCase.java delete mode 100644 java/sca/itest/distribution/webapp-helloworld-js-client/pom.xml delete mode 100644 java/sca/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java delete mode 100644 java/sca/itest/distribution/webapp-helloworld-jsf/pom.xml delete mode 100644 java/sca/itest/distribution/webapp-helloworld-jsf/src/test/java/itest/HelloworldTestCaseFIXME.java delete mode 100644 java/sca/itest/distribution/webapp-helloworld-jsp/pom.xml delete mode 100644 java/sca/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java delete mode 100644 java/sca/itest/distribution/webapp-helloworld-servlet/pom.xml delete mode 100644 java/sca/itest/distribution/webapp-helloworld-servlet/src/test/java/itest/HelloworldTestCase.java delete mode 100644 java/sca/itest/distribution/webapp-helloworld-stripes/pom.xml delete mode 100644 java/sca/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java delete mode 100644 java/sca/itest/distribution/webapp-helloworld/pom.xml (limited to 'java/sca/itest/distribution') diff --git a/java/sca/itest/distribution/bin-distro-unzip/build.xml b/java/sca/itest/distribution/bin-distro-unzip/build.xml deleted file mode 100644 index 68e15d4a8b..0000000000 --- a/java/sca/itest/distribution/bin-distro-unzip/build.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - diff --git a/java/sca/itest/distribution/bin-distro-unzip/pom.xml b/java/sca/itest/distribution/bin-distro-unzip/pom.xml deleted file mode 100644 index d58e479f93..0000000000 --- a/java/sca/itest/distribution/bin-distro-unzip/pom.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-bin-distro-unzip - Apache Tuscany SCA iTest Bin Distro Unzip - - - - org.apache.tuscany.sca - tuscany-distribution-all - pom - 2.0-SNAPSHOT - - - - - - - - not-sun-jdk - - - ${java.home}/../lib/tools.jar - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - run-samples - verify - - run - - - - - - - - - - - - - - - - - sun-jdk - - - ${java.home}/../lib/tools.jar - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.3 - - - - ant - ant-trax - 1.6.5 - - - - sun.jdk - tools - 1.6 - system - ${java.home}/../lib/tools.jar - - - - - - run-samples - verify - - run - - - - - - - - - - - - - - - - - diff --git a/java/sca/itest/distribution/binding-ws-calculator/build.xml b/java/sca/itest/distribution/binding-ws-calculator/build.xml deleted file mode 100644 index ed22bce2dc..0000000000 --- a/java/sca/itest/distribution/binding-ws-calculator/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - ${java.home} - - - - - - - - - - - diff --git a/java/sca/itest/distribution/binding-ws-calculator/pom.xml b/java/sca/itest/distribution/binding-ws-calculator/pom.xml deleted file mode 100644 index 3f4cb4b536..0000000000 --- a/java/sca/itest/distribution/binding-ws-calculator/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-binding-ws-calculator - Apache Tuscany SCA iTest Distribution binding-ws-calculator - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - run-samples - verify - - run - - - - - - - - - - - - - - diff --git a/java/sca/itest/distribution/calculator-rmi/build.xml b/java/sca/itest/distribution/calculator-rmi/build.xml deleted file mode 100644 index 25abf4e040..0000000000 --- a/java/sca/itest/distribution/calculator-rmi/build.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/sca/itest/distribution/calculator-rmi/pom.xml b/java/sca/itest/distribution/calculator-rmi/pom.xml deleted file mode 100644 index faf6132fbd..0000000000 --- a/java/sca/itest/distribution/calculator-rmi/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-calculator-rmi - Apache Tuscany SCA iTest Distribution calculator-rmi - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - run-samples - verify - - run - - - - - - - - - - - - - diff --git a/java/sca/itest/distribution/implementation-java-calculator/build.xml b/java/sca/itest/distribution/implementation-java-calculator/build.xml deleted file mode 100644 index 106fee758c..0000000000 --- a/java/sca/itest/distribution/implementation-java-calculator/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - ${java.home} - - - - - - - - - - - diff --git a/java/sca/itest/distribution/implementation-java-calculator/pom.xml b/java/sca/itest/distribution/implementation-java-calculator/pom.xml deleted file mode 100644 index 584b7ca5e9..0000000000 --- a/java/sca/itest/distribution/implementation-java-calculator/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-implementation-java-calculator - Apache Tuscany SCA iTest Distribution implementation-java-calculator - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.3 - - - - ant - ant-trax - 1.6.5 - - - - sun.jdk - tools - 1.6 - system - ${java.home}/../lib/tools.jar - - - - - - run-samples - verify - - run - - - - - - - - - - - - - - diff --git a/java/sca/itest/distribution/legal-checks/pom.xml b/java/sca/itest/distribution/legal-checks/pom.xml deleted file mode 100644 index c5f118458f..0000000000 --- a/java/sca/itest/distribution/legal-checks/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-legal-checks - Apache Tuscany SCA iTest Distribution Legal Checks - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - - - diff --git a/java/sca/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java b/java/sca/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java deleted file mode 100644 index 2cbbe57125..0000000000 --- a/java/sca/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java +++ /dev/null @@ -1,162 +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; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; - -import org.junit.Test; - -/** - * Checks that all jar files included in the distribution are mentioned in the LICENSE file - * and that all jars mentioned in the LICENSE are in the distribution. - */ -public class JarsInLICENSETestCase { - - @Test - public void testJars() throws Exception { - File distroRoot = getUnzipedDistroRoot(); - - File licenseFile = new File(distroRoot, "LICENSE"); - if (!licenseFile.exists()) { - throw new IllegalStateException("can't find LICENSE file at: " + licenseFile.getAbsoluteFile().toString()); - } - - File libDirectory = new File(distroRoot, "modules"); - if (!libDirectory.exists()) { - throw new IllegalStateException("can't find modules folder at: " + libDirectory.getAbsoluteFile().toString()); - } - - List jars = getJarsInDistro(libDirectory); - - List bad2 = getLICENSEJarsNotInDistro(licenseFile, jars); - if (bad2.size() > 0) { - System.err.println("Jars in LICENSE but not in Distribution: " + bad2); - } - - List bad1 = getJarsNotInLICENSE(jars, licenseFile); - if (bad1.size() > 0) { - System.err.println("Jars in distribution but not in LICENSE: " + bad1); - } - - if (bad1.size() > 0 || bad2.size() > 0) { - throw new IllegalStateException("LICENSE problems, check log"); - } - } - - private List getLICENSEJarsNotInDistro(File licenseFile, List jars) throws IOException { - List badJars = new ArrayList(); - BufferedReader reader = new BufferedReader(new FileReader(licenseFile)); - String line = null; - while ((line = reader.readLine()) != null) { - line = line.trim(); - if (line.contains(".jar")) { - StringTokenizer st = new StringTokenizer(line); - while (st.hasMoreTokens()) { - String s = st.nextToken(); - if (s.contains(".jar")) { - if (s.startsWith("(")) { - s = s.substring(1); - } - if (s.endsWith(",") || s.endsWith(":")) { - s = s.substring(0, s.length()-1); - } - if (s.endsWith(")")) { - s = s.substring(0, s.length()-1); - } - if (!jars.contains(s) && !s.startsWith("tuscany-")) { - badJars.add(s); - } - } - } - } - } - return badJars; - } - - private List getJarsNotInLICENSE(List jars, File licenseFile) throws IOException { - List badJars = new ArrayList(); - String licenseText = readLICENSE(licenseFile); - for (String jar : jars) { - if (!licenseText.contains(jar)) { - if (jar.startsWith("tuscany-")) { - // ignore tuscany jars as they're not mentioned in the LICENSE file - } else { - badJars.add(jar); - } - } - } - return badJars; - } - - private List getJarsInDistro(File directory) { - List jars = new ArrayList(); - for (String fn : directory.list()){ - if (fn.endsWith(".jar")) { - jars.add(fn); - } else { - File f = new File(directory, fn); - if (f.isDirectory()) { - jars.addAll(getJarsInDistro(f)); - } - } - } - return jars; - } - - private File getUnzipedDistroRoot() { - File distroTarget = new File("../../../distribution/all/target"); - File root = null; - for (String f : distroTarget.list()) { - if (f.endsWith("-dir")) { - root = new File(distroTarget, f); - break; - } - } - if (root == null) { - throw new IllegalStateException("can't find distro root"); - } - if (root.list().length != 1) { - throw new IllegalStateException("expecting one directory in distro root"); - } - root = new File(root, root.list()[0]); - return root; - } - - private static String readLICENSE(File licenseFile) throws java.io.IOException { - StringBuffer fileData = new StringBuffer(); - BufferedReader reader = new BufferedReader(new FileReader(licenseFile)); - char[] buf = new char[1024]; - int numRead = 0; - while ((numRead = reader.read(buf)) != -1) { - String readData = String.valueOf(buf, 0, numRead); - fileData.append(readData); - buf = new char[1024]; - } - reader.close(); - return fileData.toString(); - } - -} diff --git a/java/sca/itest/distribution/pom.xml b/java/sca/itest/distribution/pom.xml deleted file mode 100644 index f8809b5ab2..0000000000 --- a/java/sca/itest/distribution/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-SNAPSHOT - ../pom.xml - - pom - itest-distribution - Apache Tuscany SCA iTest Distribution - - - install - - - - bin-distro-unzip - binding-ws-calculator - calculator-rmi - implementation-java-calculator - legal-checks - webapp-helloworld - webapp-helloworld-bpel - webapp-helloworld-js-client - webapp-helloworld-jsp - webapp-helloworld-servlet - webapp-helloworld-stripes - - - diff --git a/java/sca/itest/distribution/webapp-helloworld-bpel/pom.xml b/java/sca/itest/distribution/webapp-helloworld-bpel/pom.xml deleted file mode 100644 index e1c8a508f5..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-bpel/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-bpel - Apache Tuscany SCA iTest Distribution Webapp helloworld-bpel - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-bpel - war - 2.0-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - jetty6x - embedded - - org.apache.commons.logging.impl.SimpleLog - - - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-bpel - - - - org.apache.tuscany.sca - helloworld-bpel - war - - helloworld-bpel - - - - - - - - - - diff --git a/java/sca/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 5b29292acf..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,50 +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; - -import static org.junit.Assert.assertEquals; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-bpel"); - Iterator ss = page.getAllHtmlChildElements(); - ss.next(); - ss.next(); - ss.next(); - HtmlParagraph p = (HtmlParagraph)ss.next(); - assertEquals("Hello world", p.asText()); - } - -} diff --git a/java/sca/itest/distribution/webapp-helloworld-jms/pom.xml b/java/sca/itest/distribution/webapp-helloworld-jms/pom.xml deleted file mode 100644 index 97662f26ca..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jms/pom.xml +++ /dev/null @@ -1,216 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-jms - Apache Tuscany SCA iTest Distribution Webapp helloworld-jms - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-jms - war - 2.0-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - org.mortbay.jetty - jsp-2.0 - 6.1.19 - pom - compile - - - org.mortbay.jetty - jetty-naming - 6.1.19 - - - org.mortbay.jetty - jetty-plus - 6.1.19 - - - geronimo-spec - geronimo-spec-jta - 1.0.1B-rc4 - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - - jetty6x - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer - - embedded - - - - org.mortbay.jetty - jetty - - - org.mortbay.jetty - jetty-util - - - org.mortbay.jetty - jetty-plus - - - org.mortbay.jetty - jetty-naming - - - geronimo-spec - geronimo-spec-jta - - - javax.servlet - servlet-api - - - org.mortbay.jetty - jsp-2.0 - - - tomcat - jasper-runtime - - - tomcat - jasper-compiler - - - commons-logging - commons-logging - - - tomcat - jasper-compiler-jdt - - - org.mortbay.jetty - jsp-api-2.0 - - - commons-el - commons-el - - - - - - - - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-jms - - - - org.apache.tuscany.sca - helloworld-jms - war - - helloworld-jms - - - - - - - - - - diff --git a/java/sca/itest/distribution/webapp-helloworld-jms/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-jms/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index bc436667c8..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jms/src/test/java/itest/HelloworldTestCase.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 itest; - -import static org.junit.Assert.assertEquals; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-jms"); - Iterator ss = page.getAllHtmlChildElements(); - ss.next(); - ss.next(); - ss.next(); - ss.next(); - HtmlParagraph p = (HtmlParagraph)ss.next(); - assertEquals("Hello world", p.asText()); - } - -} diff --git a/java/sca/itest/distribution/webapp-helloworld-js-client/pom.xml b/java/sca/itest/distribution/webapp-helloworld-js-client/pom.xml deleted file mode 100644 index 32c66015d0..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-js-client/pom.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-js-client - Apache Tuscany SCA iTest Distribution Webapp helloworld-js-client - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-js-client - war - 2.0-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - org.mortbay.jetty - jsp-2.0 - 6.1.19 - pom - compile - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - - latest-jetty6x - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer - - embedded - - - - org.mortbay.jetty - jetty - - - org.mortbay.jetty - jetty-util - - - javax.servlet - servlet-api - - - org.mortbay.jetty - jsp-2.0 - - - tomcat - jasper-runtime - - - tomcat - jasper-compiler - - - commons-logging - commons-logging - - - tomcat - jasper-compiler-jdt - - - org.mortbay.jetty - jsp-api-2.0 - - - commons-el - commons-el - - - - - - - - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-jsp - - - - org.apache.tuscany.sca - helloworld-js-client - war - - helloworld-js-client - - - - - - - - - - diff --git a/java/sca/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 099b442050..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.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 itest; - -import static org.junit.Assert.assertTrue; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.net.URLEncoder; - -import org.junit.Test; - -/** - * Verfiy the serverside code is working, not sure how to easily itest the browser javascript code - */ -public class HelloworldTestCase { - - @Test - public void testA() throws MalformedURLException, IOException { - - URL url = new URL("http://localhost:8085/helloworld-js-client/org.oasisopen.sca.componentContext.js/foo/call/plaincall/service.sayHello.dwr"); - URLConnection conn = url.openConnection(); - conn.setDoOutput(true); - OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); - - // to find this run the sample through TCPMON to capture the messages - - String data = URLEncoder.encode("callCount", "UTF-8") + "=" + URLEncoder.encode("1", "UTF-8"); - data += "&" + URLEncoder.encode("page", "UTF-8") + "=" + URLEncoder.encode("/helloworld-js-client/", "UTF-8"); - data += "&" + URLEncoder.encode("httpSessionId", "UTF-8") + "=" + URLEncoder.encode("", "UTF-8"); - data += "&" + URLEncoder.encode("scriptSessionId", "UTF-8") + "=" + URLEncoder.encode("A023DA664E56F075491BE1B87B37B02671", "UTF-8"); - data += "&" + URLEncoder.encode("c0-scriptName", "UTF-8") + "=" + URLEncoder.encode("service", "UTF-8"); - data += "&" + URLEncoder.encode("c0-methodName", "UTF-8") + "=" + URLEncoder.encode("sayHello", "UTF-8"); - data += "&" + URLEncoder.encode("c0-id", "UTF-8") + "=" + URLEncoder.encode("0", "UTF-8"); - data += "&" + URLEncoder.encode("c0-param0", "UTF-8") + "=" + URLEncoder.encode("string:petra", "UTF-8"); - data += "&" + URLEncoder.encode("batchId", "UTF-8") + "=" + URLEncoder.encode("0", "UTF-8"); - - wr.write(data); - wr.flush(); - - BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); - rd.readLine(); // throw 'allowScriptTagRemoting is false.'; - rd.readLine(); //#DWR-INSERT - rd.readLine(); //#DWR-REPLY - String line = rd.readLine(); // dwr.engine._remoteHandleCallback('0','0',"Hello petra"); - wr.close(); - rd.close(); - - assertTrue(line.endsWith("\"Hello petra\");")); - - } - -} diff --git a/java/sca/itest/distribution/webapp-helloworld-jsf/pom.xml b/java/sca/itest/distribution/webapp-helloworld-jsf/pom.xml deleted file mode 100644 index 3a2ff11a11..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jsf/pom.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-jsf - Apache Tuscany SCA iTest Distribution Webapp helloworld-jsf - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-jsf - war - 2.0-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - javax.el - el-api - 1.0 - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - jetty6x - embedded - - org.apache.commons.logging.impl.SimpleLog - - - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-jsf - - - - org.apache.tuscany.sca - helloworld-jsf - war - - helloworld-jsf - - - - - - - - - - diff --git a/java/sca/itest/distribution/webapp-helloworld-jsf/src/test/java/itest/HelloworldTestCaseFIXME.java b/java/sca/itest/distribution/webapp-helloworld-jsf/src/test/java/itest/HelloworldTestCaseFIXME.java deleted file mode 100644 index 1f90a772ac..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jsf/src/test/java/itest/HelloworldTestCaseFIXME.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 itest; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - * TODO: This doesn't work yet, I can't find the hello response in the - * the response page from the button click. Not sure if thats just - * looking in the wrong place or the button click is not working - * Also the Cargo maven plugin has a problem finding the el-api when using Jetty - */ -public class HelloworldTestCaseFIXME { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-jsf"); - - HtmlForm form = page.getFormByName("mainForm"); - - HtmlInput textField = form.getInputByName("mainForm:name"); - textField.setValueAttribute("root"); - - Iterator i = form.getChildIterator(); - i.next(); - HtmlInput button = (HtmlInput)i.next(); - - HtmlPage page2 = (HtmlPage)button.click(); - - Iterator ss = page2.getAllHtmlChildElements(); - ss.next(); - ss.next(); - ss.next(); - ss.next(); - HtmlForm form2 = (HtmlForm)ss.next(); - - Object oow = form2.getFirstChild(); - System.out.println(oow); -// assertTrue(p.asText().startsWith("Hello Petra")); - } - -} diff --git a/java/sca/itest/distribution/webapp-helloworld-jsp/pom.xml b/java/sca/itest/distribution/webapp-helloworld-jsp/pom.xml deleted file mode 100644 index 4f41a3a0ef..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jsp/pom.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-jsp - Apache Tuscany SCA iTest Distribution Webapp helloworld-jsp - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-jsp - war - 2.0-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - org.mortbay.jetty - jsp-2.0 - 6.1.19 - pom - compile - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - - latest-jetty6x - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer - - embedded - - - - org.mortbay.jetty - jetty - - - org.mortbay.jetty - jetty-util - - - javax.servlet - servlet-api - - - org.mortbay.jetty - jsp-2.0 - - - tomcat - jasper-runtime - - - tomcat - jasper-compiler - - - commons-logging - commons-logging - - - tomcat - jasper-compiler-jdt - - - org.mortbay.jetty - jsp-api-2.0 - - - commons-el - commons-el - - - - - - - - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-jsp - - - - org.apache.tuscany.sca - helloworld-jsp - war - - helloworld-jsp - - - - - - - - - - diff --git a/java/sca/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 2be60be081..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,50 +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; - -import static org.junit.Assert.assertEquals; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-jsp"); - Iterator ss = page.getAllHtmlChildElements(); - ss.next(); - ss.next(); - ss.next(); - HtmlParagraph p = (HtmlParagraph)ss.next(); - assertEquals("Hello world", p.asText()); - } - -} diff --git a/java/sca/itest/distribution/webapp-helloworld-servlet/pom.xml b/java/sca/itest/distribution/webapp-helloworld-servlet/pom.xml deleted file mode 100644 index 2b5915ca88..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-servlet/pom.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-servlet - Apache Tuscany SCA iTest Distribution Webapp helloworld-servlet - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-servlet - war - 2.0-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - org.mortbay.jetty - jsp-2.0 - 6.1.19 - pom - compile - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - - latest-jetty6x - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer - - embedded - - - - org.mortbay.jetty - jetty - - - org.mortbay.jetty - jetty-util - - - javax.servlet - servlet-api - - - org.mortbay.jetty - jsp-2.0 - - - tomcat - jasper-runtime - - - tomcat - jasper-compiler - - - commons-logging - commons-logging - - - tomcat - jasper-compiler-jdt - - - org.mortbay.jetty - jsp-api-2.0 - - - commons-el - commons-el - - - - - - - - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-jsp - - - - org.apache.tuscany.sca - helloworld-servlet - war - - helloworld-servlet - - - - - - - - - - diff --git a/java/sca/itest/distribution/webapp-helloworld-servlet/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-servlet/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index bed840b44a..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-servlet/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,60 +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; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.net.MalformedURLException; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.UnexpectedPage; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlButton; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-servlet"); - - HtmlForm form = (HtmlForm) page.getForms().get(0); - - HtmlInput textField = form.getInputByName("name"); - textField.setValueAttribute("petra"); - - HtmlButton button = (HtmlButton) form.getButtonsByName("submit").get(0); - - Object foo = button.click(); - - // TODO: something up with getting the response but this works: - UnexpectedPage p = (UnexpectedPage) foo; - String s = new String(p.getWebResponse().getResponseBody()); - - assertTrue(s.endsWith("Hello petra")); - } - -} diff --git a/java/sca/itest/distribution/webapp-helloworld-stripes/pom.xml b/java/sca/itest/distribution/webapp-helloworld-stripes/pom.xml deleted file mode 100644 index 8d312f75c8..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-stripes/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-stripes - Apache Tuscany SCA iTest Distribution Webapp helloworld-stripes - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-stripes - war - 2.0-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - jetty6x - embedded - - org.apache.commons.logging.impl.SimpleLog - - - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-stripes - - - - org.apache.tuscany.sca - helloworld-stripes - war - - helloworld-stripes - - - - - - - - - - diff --git a/java/sca/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java b/java/sca/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 743ab054c8..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,53 +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; - -import static org.junit.Assert.assertEquals; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-stripes"); - Iterator ss = page.getAllHtmlChildElements(); - Object o1= ss.next(); - Object o2= ss.next(); - Object o3= ss.next(); - Object o4= ss.next(); - Object o5= ss.next(); - Object o6= ss.next(); - HtmlParagraph p = (HtmlParagraph)ss.next(); - assertEquals("sayHello returns: Hello world", p.asText()); - } - -} diff --git a/java/sca/itest/distribution/webapp-helloworld/pom.xml b/java/sca/itest/distribution/webapp-helloworld/pom.xml deleted file mode 100644 index 81d7304e00..0000000000 --- a/java/sca/itest/distribution/webapp-helloworld/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld - Apache Tuscany SCA iTest Distribution Webapp helloworld - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld - war - 2.0-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - httpunit - httpunit - 1.6.1 - test - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - pre-integration-test - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - jetty6x - embedded - - org.apache.commons.logging.impl.SimpleLog - - - - - ${project.build.directory}/cargo-jetty - - - - 8085 - - - - org.apache.tuscany.sca - helloworld - war - http://localhost:8085/helloworld - - - - - - - - - -- cgit v1.2.3