Merge r1023372 TUSCANY-3685: Add jar in binary distribution for test classes and resources

git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-1.x/trunk@1027618 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/samples/implementation-pojo-extension/build.xml b/samples/implementation-pojo-extension/build.xml
index 9f4869c..1226477 100644
--- a/samples/implementation-pojo-extension/build.xml
+++ b/samples/implementation-pojo-extension/build.xml
@@ -51,6 +51,7 @@
             <fileset dir="src/test/resources"/>
         </copy>
         <jar destfile="target/sample-implementation-pojo-extension.jar" basedir="target/classes"/>
+        <jar destfile="target/sample-implementation-pojo-extension-test.jar" basedir="target/test-classes"/>
     </target>	
 
     <target name="package" depends="compile"/>
@@ -58,7 +59,7 @@
     <target name="run">
         <java classname="helloworld.HelloWorldTestClient" fork="true">
             <classpath>
-                <pathelement location="target/test-classes"/>
+                <pathelement location="target/sample-implementation-pojo-extension-test.jar"/>
                 <pathelement location="target/sample-implementation-pojo-extension.jar"/>
                 <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
             </classpath>
diff --git a/samples/implementation-pojo-extension/pom.xml b/samples/implementation-pojo-extension/pom.xml
index f17e891..e992f39 100644
--- a/samples/implementation-pojo-extension/pom.xml
+++ b/samples/implementation-pojo-extension/pom.xml
@@ -71,7 +71,29 @@
     </dependencies>
 
     <build>
-       <finalName>${artifactId}</finalName>
+        <finalName>${artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>test</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/test/assembly/test.xml</descriptor>
+                            </descriptors>
+                            <tarLongFileMode>gnu</tarLongFileMode>
+                            <finalName>${artifactId}</finalName>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
     </build>
 
 </project>
diff --git a/samples/implementation-pojo-extension/src/test/assembly/test.xml b/samples/implementation-pojo-extension/src/test/assembly/test.xml
new file mode 100644
index 0000000..ece2cbc
--- /dev/null
+++ b/samples/implementation-pojo-extension/src/test/assembly/test.xml
@@ -0,0 +1,34 @@
+<?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.

+-->

+<assembly>

+    <id>test</id>

+    <includeBaseDirectory>false</includeBaseDirectory>

+    <formats>

+        <format>jar</format>

+    </formats>

+

+    <fileSets>

+        <fileSet>

+            <directory>target/test-classes</directory>

+            <outputDirectory>/</outputDirectory>

+        </fileSet>

+    </fileSets>

+        

+</assembly>