diff options
Diffstat (limited to 'branches/sca-java-2.0-M4/distribution/tomcat/testing')
14 files changed, 0 insertions, 613 deletions
diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/download-tomcat/pom.xml b/branches/sca-java-2.0-M4/distribution/tomcat/testing/download-tomcat/pom.xml deleted file mode 100644 index ae49735c48..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/download-tomcat/pom.xml +++ /dev/null @@ -1,63 +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-distribution-tomcat-testing</artifactId> - <version>2.0-M4-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>download-tomcat</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Tomcat Integration Testing Download Tomcat</name> - - <properties> - <tomcat.version>6.0.18</tomcat.version> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>wagon-maven-plugin</artifactId> - <version>1.0-beta-1</version> - <executions> - <execution> - <id>download-tomcat</id> - <phase>pre-integration-test</phase> - <goals> - <goal>download-single</goal> - </goals> - <configuration> - <!-- Note: the url should be "archive.apache.org" but that is truncating the file at 4808k, - no idea why but it sounds like an infra problem - https://issues.apache.org/jira/browse/INFRA-1910 --> - <url>http://www.eu.apache.org</url> - <fromFile>dist/tomcat/tomcat-6/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.zip</fromFile> - <toDir>download</toDir> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - -</project> diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/pom.xml b/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/pom.xml deleted file mode 100644 index 7ea117e7cf..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/pom.xml +++ /dev/null @@ -1,47 +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-distribution-tomcat-testing</artifactId> - <version>2.0-M4-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>helloworld-client-webapp</artifactId> - <packaging>war</packaging> - <name>Apache Tuscany SCA Tomcat Integration Testing Helloworld Client Webapp</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>2.0-M4-SNAPSHOT</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> - -</project> - diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/java/testing/HelloworldService.java b/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/java/testing/HelloworldService.java deleted file mode 100644 index 8c67e05aa7..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/java/testing/HelloworldService.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 testing; - -// TODO: should the webapp need to include the service interface? - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/webapp/WEB-INF/web.composite b/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index c03a70c58a..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/webapp/WEB-INF/web.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/200903" - targetNamespace="http://testing" - name="jsp-client-webapp"> - - <!-- TODO: should the component name be unique in the domain? i guess so --> - <component name="WebComponent"> - <implementation.web web-uri=""/> - <reference name="service" target="HelloworldComponent"/> - </component> - -</composite> diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 411d8a3146..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,31 +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. ---> -<web-app version="2.4" - xmlns="http://java.sun.com/xml/ns/j2ee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > - - <display-name>jsp-client-webapp</display-name> - - <welcome-file-list id="WelcomeFileList"> - <welcome-file>hello.jsp</welcome-file> - </welcome-file-list> - -</web-app> diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/webapp/hello.jsp b/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/webapp/hello.jsp deleted file mode 100644 index d520375993..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-client-webapp/src/main/webapp/hello.jsp +++ /dev/null @@ -1,36 +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.
---%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %>
-
-<sca:reference name="service" type="testing.HelloworldService" />
-
-<html>
- <body >
-
- <h2>jsp-client-webapp</h2>
-
- Calling HelloworldService sayHello("world") returns:
-
- <p>
-
- <%= service.sayHello("world") %>
-
- </body>
-</html>
diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/pom.xml b/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/pom.xml deleted file mode 100644 index ed7378df49..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/pom.xml +++ /dev/null @@ -1,45 +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-distribution-tomcat-testing</artifactId> - <version>2.0-M4-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>helloworld-service-contribution</artifactId> - <name>Apache Tuscany SCA Tomcat Integration Testing Helloworld Service Contribution</name> - - <dependencies> - <dependency> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-sca-api</artifactId> - <version>2.0-M4-SNAPSHOT</version> - <scope>provided</scope> - </dependency> - - </dependencies> - - <build> - <finalName>${artifactId}</finalName> - </build> -</project> diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/java/testing/HelloworldImpl.java b/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/java/testing/HelloworldImpl.java deleted file mode 100644 index c9c6ff66d6..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/java/testing/HelloworldImpl.java +++ /dev/null @@ -1,36 +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 testing; - -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.EagerInit; - -@Scope("COMPOSITE") @EagerInit -public class HelloworldImpl implements HelloworldService { - - public String sayHello(String name) { - return "Hello " + name; - } - - @Init - public void init() { - System.out.println("HelloworldImpl eager init: " + sayHello("world")); - } -} diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/java/testing/HelloworldService.java b/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/java/testing/HelloworldService.java deleted file mode 100644 index 65e95f275c..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/java/testing/HelloworldService.java +++ /dev/null @@ -1,25 +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 testing; - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 9bdfd4e58b..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/resources/META-INF/sca-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/200903" - xmlns:testing="http://org.apache.tuscany.tomcat.testing"> - <deployable composite="testing:helloworld-service-contribution"/> -</contribution>
\ No newline at end of file diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/resources/helloworld.composite b/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/resources/helloworld.composite deleted file mode 100644 index 2d6ce9419b..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/helloworld-service-contribution/src/main/resources/helloworld.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/200903" - targetNamespace="http://org.apache.tuscany.tomcat.testing" - name="helloworld-service-contribution"> - - <component name="HelloworldComponent"> - <implementation.java class="testing.HelloworldImpl"/> - </component> - -</composite> diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/legal-checks/pom.xml b/branches/sca-java-2.0-M4/distribution/tomcat/testing/legal-checks/pom.xml deleted file mode 100644 index 64f991464d..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/legal-checks/pom.xml +++ /dev/null @@ -1,36 +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>itest-distribution</artifactId> - <version>2.0-M4-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>war-legal-checks</artifactId> - <name>Apache Tuscany SCA WAR Distribution Legal Checks</name> - - <dependencies> - </dependencies> - - <build> - </build> -</project> diff --git a/branches/sca-java-2.0-M4/distribution/tomcat/testing/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java b/branches/sca-java-2.0-M4/distribution/tomcat/testing/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java deleted file mode 100644 index 05f16f603d..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java +++ /dev/null @@ -1,147 +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 = distroRoot; - if (!libDirectory.exists()) { - throw new IllegalStateException("can't find modules folder at: " + libDirectory.getAbsoluteFile().toString()); - } - - List<String> jars = getJarsInDistro(libDirectory); - - List<String> bad2 = getLICENSEJarsNotInDistro(licenseFile, jars); - if (bad2.size() > 0) { - System.err.println("Jars in LICENSE but not in Distribution: " + bad2); - } - - List<String> 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<String> getLICENSEJarsNotInDistro(File licenseFile, List<String> jars) throws IOException { - List<String> badJars = new ArrayList<String>(); - 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<String> getJarsNotInLICENSE(List<String> jars, File licenseFile) throws IOException { - List<String> badJars = new ArrayList<String>(); - 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<String> getJarsInDistro(File directory) { - List<String> jars = new ArrayList<String>(); - 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() { - return new File("../../tomcat-war/target/tuscany.dir"); - } - - 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/branches/sca-java-2.0-M4/distribution/tomcat/testing/pom.xml b/branches/sca-java-2.0-M4/distribution/tomcat/testing/pom.xml deleted file mode 100644 index 522e452cbc..0000000000 --- a/branches/sca-java-2.0-M4/distribution/tomcat/testing/pom.xml +++ /dev/null @@ -1,39 +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-distribution-tomcat</artifactId> - <relativePath>../pom.xml</relativePath> - <version>2.0-M4-SNAPSHOT</version> - </parent> - <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-distribution-tomcat-testing</artifactId> - <packaging>pom</packaging> - <name>Apache Tuscany SCA Distribution Tomcat Testing</name> - - <modules> - <module>helloworld-service-contribution</module> - <module>helloworld-client-webapp</module> - <module>legal-checks</module> - </modules> - -</project> |