<?xml version="1.0" encoding="UTF-8"?>

<!-- ============================================================ -->
<!--  JBoss, the OpenSource J2EE webOS                            -->
<!--  Distributable under LGPL license.                           -->
<!--  See terms of license at http://www.gnu.org.                 -->
<!-- ============================================================ -->

<!-- $Id: build-samples-jaxws.xml 4374 2007-08-15 14:11:38Z mageshbk@jboss.com $ -->

<project>
  
  <!-- ================================================================== -->
  <!-- Building                                                           -->
  <!-- ================================================================== -->
  
  <target name="build-samples-jaxws" description="Build the jaxws samples deployments">
    
    <mkdir dir="${tests.output.dir}/libs"/>
    
    <!-- jaxws-webserviceref -->
    <war warfile="${tests.output.dir}/libs/jaxws-samples-webserviceref.war" webxml="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF/web.xml">
      <classes dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointImpl.class"/>
      </classes>
    </war>
    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-client.jar">
      <fileset dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
      </fileset>
      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
        <include name="application-client.xml"/>
        <include name="jboss-client.xml"/>
        <include name="wsdl/**"/>
      </metainf>
      <manifest>
        <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne"/>
      </manifest>
    </jar>
    <war destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-servlet-client.war"
      webxml="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client/web.xml">
      <classes dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EchoResponse.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
      </classes>
      <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
        <include name="wsdl/**"/>
      </webinf>
      <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client">
        <include name="jboss-web.xml"/>
      </webinf>
    </war>
    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-ejb3-client.jar">
      <fileset dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Remote.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EchoResponse.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
      </fileset>
      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
        <include name="jboss.xml"/>
        <include name="wsdl/**"/>
      </metainf>
    </jar>
    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure.jar">
      <fileset dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointImpl.class"/>
      </fileset>
    </jar>
    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure-client.jar">
      <fileset dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointClient.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointService.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpoint.class"/>
      </fileset>
      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF-secure">
        <include name="application-client.xml"/>
        <include name="jboss-client.xml"/>
      </metainf>
      <manifest>
        <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointClient"/>
      </manifest>
    </jar>
    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-override-client.jar">
      <fileset dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientTwo.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
      </fileset>
      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF-override">
        <include name="jbossws-client-config.xml"/>
        <include name="application-client.xml"/>
        <include name="jboss-client.xml"/>
      </metainf>
      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
        <include name="wsdl/**"/>
      </metainf>
      <manifest>
        <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientTwo"/>
      </manifest>
    </jar>
    
    <!-- jaxws-samples-wsaddressing -->
    <war warfile="${tests.output.dir}/libs/jaxws-samples-wsaddressing.war" webxml="${tests.output.dir}/resources/jaxws/samples/wsaddressing/WEB-INF/web.xml">
      <classes dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/StatefulEndpointImpl.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/StatefulEndpoint.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws-handlers.xml"/>
      </classes>
    </war>
    
    <!-- jaxws-samples-wseventing.war -->
    <war warfile="${tests.output.dir}/libs/jaxws-samples-wseventing.war" webxml="${tests.output.dir}/resources/jaxws/samples/wseventing/WEB-INF/web.xml">
      <classes dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/wseventing/*.class"/>
      </classes>
      <webinf dir="${tests.output.dir}/resources/jaxws/samples/wseventing/WEB-INF">
        <include name="wsdl/jboss-web.xml"/>
        <include name="wsdl/sysmon.wsdl"/>
        <include name="wsdl/ws-eventing.wsdl"/>
        <include name="wsdl/ws-eventing.xsd"/>
        <include name="wsdl/ws-addr.xsd"/>
      </webinf>
    </war>
    
    <!-- jaxws-samples-wssecurity-encrypt -->
    <war warfile="${tests.output.dir}/libs/jaxws-samples-wssecurity-encrypt.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecurity/WEB-INF/web.xml">
      <classes dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/wssecurity/Hello.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UserType.class"/>
      </classes>
      <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity/simple-encrypt/WEB-INF">
        <include name="jboss-wsse-server.xml"/>
      </webinf>
      <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity">
        <include name="wsse.keystore"/>
        <include name="wsse.truststore"/>
      </webinf>
    </war>
    
    <!-- jaxws-samples-wssecurity-sign -->
    <war warfile="${tests.output.dir}/libs/jaxws-samples-wssecurity-sign.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecurity/WEB-INF/web.xml">
      <classes dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/wssecurity/Hello.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UserType.class"/>
      </classes>
      <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity/simple-sign/WEB-INF">
        <include name="jboss-wsse-server.xml"/>
      </webinf>
      <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity">
        <include name="wsse.keystore"/>
        <include name="wsse.truststore"/>
      </webinf>
    </war>

	<!-- jaxws-samples-wssecurity-username -->
    <war warfile="${tests.output.dir}/libs/jaxws-samples-wssecurity-username.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecurity/simple-username/WEB-INF/web.xml">
      <classes dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UsernameEndpoint.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.class"/>
      </classes>
      <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity/simple-username/WEB-INF">
		<include name="jboss-web.xml"/>
        <include name="jboss-wsse-server.xml"/>
      </webinf>
    </war>
    
    <!-- jaxws-samples-wssecurityAnnotatedpolicy-encrypt -->
    <war warfile="${tests.output.dir}/libs/jaxws-samples-wssecurityAnnotatedpolicy-encrypt.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/web.xml">
      <classes dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/Hello.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/HelloJavaBean.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wssecurityAnnotatedpolicy/UserType.class"/>
      </classes>
      <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurityAnnotatedpolicy">
        <include name="wsse.keystore"/>
        <include name="wsse.truststore"/>
      </webinf>
      <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF">
        <include name="Policy.xml"/>
      </webinf>
    </war>
  	
  	<!-- jaxws-samples-wssecuritypolicy-encrypt -->
    <war warfile="${tests.output.dir}/libs/jaxws-samples-wssecuritypolicy-encrypt.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecuritypolicy/WEB-INF/web.xml">
      <classes dir="${tests.output.dir}/classes">
        <include name="org/jboss/test/ws/jaxws/samples/wssecuritypolicy/Hello.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.class"/>
        <include name="org/jboss/test/ws/jaxws/samples/wssecuritypolicy/UserType.class"/>
      </classes>
      <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecuritypolicy">
        <include name="wsse.keystore"/>
        <include name="wsse.truststore"/>
      </webinf>
	  <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecuritypolicy/WEB-INF">
		<include name="wsdl/**"/>
	  </webinf>
    </war>

     <!-- jaxws-webserviceref -->
     <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure.jar">
        <fileset dir="${tests.output.dir}/classes">
           <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.class"/>
        </fileset>
     </jar>
     <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure-client.jar">
        <fileset dir="${tests.output.dir}/classes">
           <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.class"/>
           <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.class"/>
           <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.class"/>
        </fileset>
        <metainf dir="${tests.output.dir}/resources/jaxws/webserviceref/META-INF-secure">
           <include name="application-client.xml"/>
           <include name="jboss-client.xml"/>
        </metainf>
        <manifest>
           <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.SecureEndpointClient"/>
        </manifest>
     </jar>
     <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-override-client.jar">
        <fileset dir="${tests.output.dir}/classes">
           <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.class"/>
           <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class"/>
           <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
        </fileset>
        <metainf dir="${tests.output.dir}/resources/jaxws/webserviceref/META-INF-override">
           <include name="jbossws-client-config.xml"/>
           <include name="application-client.xml"/>
           <include name="jboss-client.xml"/>
           <include name="wsdl/**"/>
        </metainf>
        <manifest>
           <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo"/>
        </manifest>
     </jar>

     <!-- Please add alphabetically -->
    
  </target>
  
</project>
