• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Test war or jar with JBOSS

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks,

I read some examples, and found the jar and war files are not put in the /delpoy directory of Jboss, but still can be tested in some way. I don't know what is tricky. I wonder if war can be deployed but don't have to be in deploy directory of Jboss. Thank you! Please help.

Chaohua

This is examples from
http://www.jboss.org/wiki/Wiki.jsp?page=JBossWS
at the bottom samples-4.0.2.zip.


This is the build.xml file.

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

<!-- $Id: build-samples.xml,v 1.1.2.1 2005/02/21 12:29:30 tdiesler Exp $ -->

<project default="build" name="JBossWS Examples">

<property file="build.properties"/>

<property environment="env"/>
<property name="jboss.home" value="${env.JBOSS_HOME}"/>

<property name="source.java" value="${basedir}/java"/>
<property name="source.resources" value="${basedir}/resources"/>
<property name="build.dir" value="${basedir}/output"/>
<property name="build.classes" value="${build.dir}/classes"/>
<property name="build.resources" value="${build.dir}/resources"/>
<property name="build.lib" value="${build.dir}/lib"/>
<property name="build.reports" value="${build.dir}/reports"/>
<property name="lib" value="${basedir}/lib"/>

<path id="compile.classpath">
<!-- <fileset dir="${jboss.home}/client"/>
<fileset dir="${jboss.home}/server/default/deploy/jboss-ws4ee.sar"/>
<pathelement location="${jboss.home}/server/default/lib/javax.servlet.jar"/> -->
<fileset dir="${lib}/"/>
</path>

<!--
Init
-->
<target name="init">
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.lib}"/>
<mkdir dir="${build.reports}"/>
</target>

<!--
Compile, compile the sources
-->
<target name="compile" depends="init"
description="compile the sources">

<javac destdir="${build.classes}"
classpathref="compile.classpath" debug="on">
<src path="${source.java}"/>
</javac>
<copy todir="${build.resources}">
<fileset dir="${source.resources}" >
<include name="jndi.properties"/>
<include name="log4j.xml"/>
</fileset>
</copy>
</target>

<!--
Build, build the deployment -->

<target name="build" depends="compile"
description="build the deployments">

<!-- ws4ee-samples -->
<jar jarfile="${build.lib}/ws4ee-samples-client-appl.jar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/webservice/samples/Person.class"/>
<include name="org/jboss/test/webservice/samples/Organization.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationService.class"/>
</fileset>
<metainf dir="${source.resources}/webservice/samples/client-appl/META-INF">
<include name="application-client.xml"/>
<include name="jboss-client.xml"/>
</metainf>
<metainf dir="${source.resources}/webservice/samples/common">
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</metainf>
</jar>
<jar jarfile="${build.lib}/ws4ee-samples-client-ejb.jar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/webservice/samples/Person.class"/>
<include name="org/jboss/test/webservice/samples/Organization.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationService.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationClientBean.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationClientHome.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationClientRemote.class"/>
<include name="org/jboss/test/webservice/samples/ClientSideHandler.class"/>
</fileset>
<metainf dir="${source.resources}/webservice/samples/client-ejb/META-INF">
<include name="ejb-jar.xml"/>
<include name="jboss.xml"/>
</metainf>
<metainf dir="${source.resources}/webservice/samples/common">
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</metainf>
</jar>
<war warfile="${build.lib}/ws4ee-samples-client-web.war" webxml="${source.resources}/webservice/samples/client-web/WEB-INF/web.xml">
<classes dir="${build.classes}">
<include name="org/jboss/test/webservice/samples/Person.class"/>
<include name="org/jboss/test/webservice/samples/Organization.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationService.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationClientServlet.class"/>
<include name="org/jboss/test/webservice/samples/ClientSideHandler.class"/>
</classes>
<webinf dir="${source.resources}/webservice/samples/client-web/WEB-INF">
<include name="jboss-web.xml"/>
</webinf>
<webinf dir="${source.resources}/webservice/samples/common">
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</webinf>
</war>
<jar jarfile="${build.lib}/ws4ee-samples-server-ejb.jar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/webservice/samples/Person.class"/>
<include name="org/jboss/test/webservice/samples/Organization.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationEJBEndpoint.class"/>
<include name="org/jboss/test/webservice/samples/ServerSideHandler.class"/>
</fileset>
<metainf dir="${source.resources}/webservice/samples/server-ejb/META-INF">
<include name="ejb-jar.xml"/>
<include name="jboss.xml"/>
<include name="webservices.xml"/>
</metainf>
<metainf dir="${source.resources}/webservice/samples/common">
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</metainf>
</jar>
<jar jarfile="${build.lib}/ws4ee-samples-server-ejb-sec.jar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/webservice/samples/Person.class"/>
<include name="org/jboss/test/webservice/samples/Organization.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationHome.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationRemote.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationEJBEndpoint.class"/>
<include name="org/jboss/test/webservice/samples/ServerSideHandler.class"/>
</fileset>
<fileset dir="${source.resources}/webservice/samples/server-ejb-sec">
<include name="users.properties"/>
<include name="roles.properties"/>
</fileset>
<metainf dir="${source.resources}/webservice/samples/server-ejb-sec/META-INF">
<include name="ejb-jar.xml"/>
<include name="jboss.xml"/>
<include name="webservices.xml"/>
<include name="wsdl/**"/>
</metainf>
<metainf dir="${source.resources}/webservice/samples/common">
<include name="jaxrpc-mapping.xml"/>
</metainf>
</jar>
<jar jarfile="${build.lib}/ws4ee-samples-server-ejb-sec-client.jar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/webservice/samples/Person.class"/>
<include name="org/jboss/test/webservice/samples/Organization.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationService.class"/>
</fileset>
<metainf dir="${source.resources}/webservice/samples/server-ejb-sec/META-INF">
<include name="application-client.xml"/>
<include name="jboss-client.xml"/>
<include name="wsdl/**"/>
</metainf>
<metainf dir="${source.resources}/webservice/samples/common">
<include name="jaxrpc-mapping.xml"/>
</metainf>
</jar>
<jar jarfile="${build.lib}/ws4ee-samples-server-jms.jar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/webservice/samples/Person.class"/>
<include name="org/jboss/test/webservice/samples/Organization.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationJMSEndpoint.class"/>
</fileset>
<metainf dir="${source.resources}/webservice/samples/server-jms/META-INF">
<include name="ejb-jar.xml"/>
<include name="jboss.xml"/>
<include name="webservices.xml"/>
</metainf>
<metainf dir="${source.resources}/webservice/samples/common">
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</metainf>
</jar>
<war warfile="${build.lib}/ws4ee-samples-server-jse.war" webxml="${source.resources}/webservice/samples/server-jse/WEB-INF/web.xml">
<classes dir="${build.classes}">
<include name="org/jboss/test/webservice/samples/Person.class"/>
<include name="org/jboss/test/webservice/samples/Organization.class"/>
<include name="org/jboss/test/webservice/samples/OrganizationJSEEndpoint.class"/>
<include name="org/jboss/test/webservice/samples/ServerSideHandler.class"/>
</classes>
<webinf dir="${source.resources}/webservice/samples/server-jse/WEB-INF">
<include name="webservices.xml"/>
</webinf>
<webinf dir="${source.resources}/webservice/samples/common">
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</webinf>
</war>

</target>

<!--
Test, run the testsuite
-->
<target name="tests" depends="build"
description="run the testsuite">

<junit printsummary="yes" showoutput="yes" dir="${build.resources}">
<classpath>
<pathelement path="${build.classes}"/>
<pathelement path="${build.resources}"/>
<path refid="compile.classpath"/>
</classpath>
<formatter type="plain"/>
<formatter type="xml"/>
<sysproperty key="java.endorsed.dirs" value="${jboss.home}/lib/endorsed"/>
<batchtest fork="yes" todir="${build.reports}">
<fileset dir="${source.java}">
<include name="org/jboss/test/webservice/samples/*TestCase.java"/>
</fileset>
</batchtest>
</junit>

<junitreport todir="${build.reports}">
<fileset dir="${build.reports}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${build.reports}/html"/>
</junitreport>
</target>


<!--
Test, clean the sample build
-->
<target name="clean"
description="clean the samples">
<delete dir="${build.dir}"/>
</target>

</project>
reply
    Bookmark Topic Watch Topic
  • New Topic