summaryrefslogtreecommitdiffstats
path: root/sandbox/sebastien/java/wrapped/testing/itest/distribution
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/sebastien/java/wrapped/testing/itest/distribution')
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/bin-distro-unzip/build.xml27
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/bin-distro-unzip/pom.xml128
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-jsonrpc-calculator/build.xml40
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml87
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-rmi-calculator/build.xml39
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml68
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-sca-calculator/build.xml40
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml87
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-ws-calculator/build.xml40
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-ws-calculator/pom.xml69
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-implementation-java-calculator/build.xml40
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml87
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-jse/build.xml57
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-jse/pom.xml69
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-osgi/build.xml45
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-osgi/pom.xml69
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/legal-checks/pom.xml74
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java162
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/pom.xml87
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-rat/pom.xml90
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-unzip/build.xml27
-rw-r--r--sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-unzip/pom.xml128
22 files changed, 1560 insertions, 0 deletions
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/bin-distro-unzip/build.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/bin-distro-unzip/build.xml
new file mode 100644
index 0000000000..6e6a1ea9ef
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/bin-distro-unzip/build.xml
@@ -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.
+-->
+<project name="itest-unzip" default="unzip">
+
+ <target name="unzip">
+ <delete dir="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir"/>
+ <unzip src="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.zip"
+ dest="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir"/>
+ </target>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/bin-distro-unzip/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/bin-distro-unzip/pom.xml
new file mode 100644
index 0000000000..d9793d810d
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/bin-distro-unzip/pom.xml
@@ -0,0 +1,128 @@
+<?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-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Bin Distro Unzip</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-distribution-all</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+ <!-- HACK: use profile to control if we need to add tools.jar -->
+ <!-- Mac OS doesn't have tools.jar -->
+ <profiles>
+ <profile>
+ <id>not-sun-jdk</id>
+ <activation>
+ <file>
+ <missing>${java.home}/../lib/tools.jar</missing>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${version}" />
+ <ant antfile="./build.xml" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>sun-jdk</id>
+ <activation>
+ <file>
+ <exists>${java.home}/../lib/tools.jar</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 -->
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.6</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${version}" />
+ <ant antfile="./build.xml" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-jsonrpc-calculator/build.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-jsonrpc-calculator/build.xml
new file mode 100644
index 0000000000..3822085094
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-jsonrpc-calculator/build.xml
@@ -0,0 +1,40 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/binding-jsonrpc/calculator-contribution"/>
+
+ </target>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml
new file mode 100644
index 0000000000..90151dc9b7
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml
@@ -0,0 +1,87 @@
+<?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-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-contribution-binding-jsonrpc-calculator</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Contribution binding-jsonrpc Calculator</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 -->
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.6</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="tuscany.version" value="${version}" />
+ <property name="java.home" value="${java.home}"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-rmi-calculator/build.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-rmi-calculator/build.xml
new file mode 100644
index 0000000000..7550f70fb5
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-rmi-calculator/build.xml
@@ -0,0 +1,39 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/binding-rmi/calculator-reference-contribution"/>
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/binding-rmi/calculator-service-contribution"/>
+ </target>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml
new file mode 100644
index 0000000000..35058e8300
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml
@@ -0,0 +1,68 @@
+<?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-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-contribution-binding-rmi-calculator</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Contribution binding-rmi Calculator</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="tuscany.version" value="${version}" />
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-sca-calculator/build.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-sca-calculator/build.xml
new file mode 100644
index 0000000000..aa13cba49b
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-sca-calculator/build.xml
@@ -0,0 +1,40 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/binding-sca/calculator-contribution"/>
+
+ </target>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml
new file mode 100644
index 0000000000..5ea30a20f7
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml
@@ -0,0 +1,87 @@
+<?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-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-contribution-binding-sca-calculator</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Contribution binding-sca Calculator</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 -->
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.6</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="tuscany.version" value="${version}" />
+ <property name="java.home" value="${java.home}"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-ws-calculator/build.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-ws-calculator/build.xml
new file mode 100644
index 0000000000..7b95bedf6c
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-ws-calculator/build.xml
@@ -0,0 +1,40 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/binding-ws/calculator-contribution"/>
+
+ </target>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-ws-calculator/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-ws-calculator/pom.xml
new file mode 100644
index 0000000000..c598f122e0
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-binding-ws-calculator/pom.xml
@@ -0,0 +1,69 @@
+<?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-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-contribution-binding-ws-calculator</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Contribution binding-ws Calculator</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${version}" />
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-implementation-java-calculator/build.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-implementation-java-calculator/build.xml
new file mode 100644
index 0000000000..e70619ab51
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-implementation-java-calculator/build.xml
@@ -0,0 +1,40 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/implementation-java/calculator-contribution"/>
+
+ </target>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml
new file mode 100644
index 0000000000..a0a1790c00
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml
@@ -0,0 +1,87 @@
+<?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-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-contribution-implementation-java-calculator</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution contribution implementation-java Calculator</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 -->
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.6</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="tuscany.version" value="${version}" />
+ <property name="java.home" value="${java.home}"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-jse/build.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-jse/build.xml
new file mode 100644
index 0000000000..02c353e083
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-jse/build.xml
@@ -0,0 +1,57 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-jse"
+ target="sample-binding-sca-calculator-contribution">
+ </ant>
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-jse"
+ target="sample-binding-ws-calculator-contribution">
+ </ant>
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-jse"
+ target="sample-binding-rmi-calculator-contribution">
+ </ant>
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-jse"
+ target="sample-implementation-java-calculator-contribution">
+ </ant>
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-jse"
+ target="sample-implementation-java-calculator-async-contribution">
+ </ant>
+
+ </target>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-jse/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-jse/pom.xml
new file mode 100644
index 0000000000..93bd2e3327
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-jse/pom.xml
@@ -0,0 +1,69 @@
+<?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-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-launcher-embedded-jse</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Launcher Embedded JSE</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${version}" />
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-osgi/build.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-osgi/build.xml
new file mode 100644
index 0000000000..0015b13f49
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-osgi/build.xml
@@ -0,0 +1,45 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+<!-- Seems to be hanging in the console at the end of the OSGi run
+ configure it to run no tests for now
+ <ant dir="${distro.root}/samples/launcher-embedded-osgi"
+ target="run-contribution-binding-sca-calculator"/>
+-->
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-osgi"/>
+
+ </target>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-osgi/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-osgi/pom.xml
new file mode 100644
index 0000000000..0e4a97a07f
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/launcher-embedded-osgi/pom.xml
@@ -0,0 +1,69 @@
+<?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-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-launcher-embedded-osgi</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Launcher Embedded OSGi</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${version}" />
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/legal-checks/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/legal-checks/pom.xml
new file mode 100644
index 0000000000..47ff46da35
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/legal-checks/pom.xml
@@ -0,0 +1,74 @@
+<?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-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-legal-checks</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Legal Checks</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.6</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <basedir>../../../../distribution/all/target/apache-tuscany-sca-all-2.0-SNAPSHOT.dir</basedir>
+ <excludeSubProjects>false</excludeSubProjects>
+ <excludes>
+ <exclude>tuscany-sca-2.0-SNAPSHOT/CHANGES</exclude>
+ <exclude>**/MANIFEST.MF</exclude>
+ <exclude>**/DEPENDENCIES</exclude>
+ <exclude>**/target/**/*.log</exclude>
+ <exclude>**/config.ini</exclude>
+ <exclude>**/*.odg</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT/features/configuration/config.ini</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java b/sandbox/sebastien/java/wrapped/testing/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java
new file mode 100644
index 0000000000..5ee67ff3ff
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java
@@ -0,0 +1,162 @@
+/*
+ * 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<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-") || jar.startsWith("sample-") || jar.startsWith("test-") || jar.startsWith("itest-")) {
+ // 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() {
+ 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/sandbox/sebastien/java/wrapped/testing/itest/distribution/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/pom.xml
new file mode 100644
index 0000000000..5379d2914c
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/pom.xml
@@ -0,0 +1,87 @@
+<?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>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-distribution</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-distribution-all</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>legal-checks</module>
+ <module>contribution-binding-sca-calculator</module>
+ <module>contribution-binding-ws-calculator</module>
+ <module>contribution-binding-rmi-calculator</module>
+ <module>contribution-binding-jsonrpc-calculator</module>
+ <module>contribution-implementation-java-calculator</module>
+ <module>launcher-embedded-jse</module>
+ <module>launcher-embedded-osgi</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>distribution</id>
+ <activation>
+ <property>
+ <name>buildZips</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <modules>
+ <module>src-distro-unzip</module>
+ <module>src-distro-rat</module>
+ <module>bin-distro-unzip</module>
+ <module>legal-checks</module>
+ <module>contribution-binding-sca-calculator</module>
+ <module>contribution-binding-ws-calculator</module>
+ <module>contribution-binding-rmi-calculator</module>
+ <module>contribution-binding-jsonrpc-calculator</module>
+ <module>contribution-implementation-java-calculator</module>
+ <module>launcher-embedded-jse</module>
+ <module>launcher-embedded-osgi</module>
+ </modules>
+ </profile>
+ </profiles>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ </build>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-rat/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-rat/pom.xml
new file mode 100644
index 0000000000..b57c11fc7f
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-rat/pom.xml
@@ -0,0 +1,90 @@
+<?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-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-src-dsitro-rat</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Src Distro RAT</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-src-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.6</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <basedir>../../../../distribution/all/target/apache-tuscany-sca-all-2.0-SNAPSHOT-src.dir</basedir>
+ <excludeSubProjects>false</excludeSubProjects>
+ <excludes>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/CHANGES</exclude>
+ <exclude>**/*.MF</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/testing/compliance-tests/binding-ws/sca_variables.dtd</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/binding-ws-runtime-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/repository/modules/modules.list</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/binding-ws-runtime-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/repository/services/services.list</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/implementation-spring-tie/src/main/resources/META-INF/spring.handlers</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/implementation-spring-tie/src/main/resources/META-INF/spring.schemas</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/implementation-spring-runtime/src/main/resources/META-INF/spring.handlers</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/implementation-spring-runtime/src/main/resources/META-INF/spring.schemas</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/maven/archetypes/binding/src/test/resources/projects/basic/goal.txt</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/implementation-python-runtime/src/main/resources/django/__init__.py</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/implementation-python-runtime/src/main/resources/django/utils/__init__.py</exclude>
+
+ <!-- these ones we need to implement RAT license processors to handle the non-AL headers, just exclude for now -->
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/assembly-xsd/**/*.*</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/sca-api/**/*.*</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/implementation-web-runtime/src/main/resources/META-INF/sca.tld</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/assembly-xml/src/main/resources/META-INF/sca-policy-1.1-intents-definitions-cd03.xml</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryFinderImpl.java</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/binding-comet-runtime/src/main/resources/jquery.json-2.2.min.js</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/modules/implementation-python-runtime/src/main/resources/django/utils/simplejson/*</exclude>
+ <exclude>tuscany-sca-2.0-SNAPSHOT-src/testing/compliance-tests/binding-jms/src/test/resources/tuscany-oasis-sca-tests-errors.properties</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-unzip/build.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-unzip/build.xml
new file mode 100644
index 0000000000..db9fe4a969
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-unzip/build.xml
@@ -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.
+-->
+<project name="itest-unzip" default="unzip">
+
+ <target name="unzip">
+ <delete dir="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}-src.dir"/>
+ <unzip src="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}-src.zip"
+ dest="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}-src.dir"/>
+ </target>
+
+</project>
diff --git a/sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-unzip/pom.xml b/sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-unzip/pom.xml
new file mode 100644
index 0000000000..c4b6e5eb5f
--- /dev/null
+++ b/sandbox/sebastien/java/wrapped/testing/itest/distribution/src-distro-unzip/pom.xml
@@ -0,0 +1,128 @@
+<?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-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-src-distro-unzip</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Src Distro Unzip</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-distribution-all</artifactId>
+ <type>pom</type>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+ <!-- HACK: use profile to control if we need to add tools.jar -->
+ <!-- Mac OS doesn't have tools.jar -->
+ <profiles>
+ <profile>
+ <id>not-sun-jdk</id>
+ <activation>
+ <file>
+ <missing>${java.home}/../lib/tools.jar</missing>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${version}" />
+ <ant antfile="./build.xml" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>sun-jdk</id>
+ <activation>
+ <file>
+ <exists>${java.home}/../lib/tools.jar</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 -->
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.6</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${version}" />
+ <ant antfile="./build.xml" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>