[jboss-user] [JBoss Seam] - Re: Error when using ajax and facelets

ama55 do-not-reply at jboss.com
Tue Nov 28 01:48:43 EST 2006


Here is the build.xml

  | <?xml version="1.0"?>
  | <project name="Phone Directory" default="deploy" basedir=".">
  | <!-- Allow this to be overriden by others importing this project. -->
  |     <dirname property="imported.basedir" file="${ant.file.Seam}" />
  | <!-- Give user a chance to override without editing this file or typing -D -->
  |     <property file="${imported.basedir}/build.properties" />
  | <!-- Name of project and version, used to create filenames -->
  |     <property name="Name" value="SeamApplication" />
  |     <property name="name" value="seamapp" />
  | <!-- set global properties for this build -->
  |     <property name="build.dir" value="build" />
  |     <property name="classes.dir" value="${build.dir}/classes" />
  |     <property name="src.java.dir" value="src" />
  |     <property name="lib.dir" value="lib" />
  |     <property name="deploy.dir" value="${jboss.home}/server/default/deploy" />
  |     <property name="javac.debug" value="true" />
  |     <property name="javac.deprecation" value="false" />
  | <!-- WAR -->
  |     <zipfileset id="war.docroot" dir="resources/jsp">
  |         <include name="**/*" />
  |     </zipfileset>
  |     <zipfileset id="war.webinf" prefix="WEB-INF" dir="resources/WEB-INF">
  |         <patternset refid="meta.files" />
  |     </zipfileset>
  |     <zipfileset id="war.webinf.lib" prefix="WEB-INF/lib" dir="resources/WEB-INF/lib">
  |         <include name="*.jar" />
  |     </zipfileset>
  | <!-- EJB3 -->
  |     <fileset id="ejb3.root" dir="resources">
  |         <include name="import.sql" />
  |         <include name="seam.properties" />
  |         <include name="META-INF/persistence.xml" />
  |     </fileset>
  |     <fileset id="ejb3.lib" dir="lib">
  |         <include name="jboss-seam.jar" />
  |     </fileset>
  | <!-- EAR -->
  |     <zipfileset id="ear.resources" prefix="META-INF" dir="resources/META-INF">
  |         <include name="*" />
  |         <exclude name="persistence.xml" />
  |     </zipfileset>
  | <!-- Deploy -->
  |     <fileset id="deploy" dir="resources">
  |         <include name="_NONE_" />
  |     </fileset>
  | <!-- Undeploy -->
  |     <patternset id="undeploy">
  |         <include name="_NONE_" />
  |     </patternset>
  |     <path id="build.classpath">
  |         <fileset dir="${lib.dir}">
  |             <include name="**/*.jar" />
  |         </fileset>
  |     </path>
  |     <patternset id="meta.files">
  |         <include name="**/*.dtd" />
  |         <include name="**/*.xml" />
  |         <include name="**/*.xslt" />
  |         <include name="**/*.properties" />
  |     </patternset>
  |     <patternset id="src.files">
  | <!-- include everything we want in the src directory
  |             that we didn't want in the jar itself -->
  |         <include name="**/*.java" />
  |     </patternset>
  |     <target name="clean" description="Cleans up the build directory">
  |         <delete dir="${build.dir}" />
  |     </target>
  |     <target name="init" description="Initialize the build">
  |         <echo message="Build ${Name}" />
  |         <mkdir dir="${classes.dir}" />
  |         <copy todir="${classes.dir}">
  |             <fileset dir="${src.java.dir}">
  |                 <patternset refid="meta.files" />
  |             </fileset>
  |         </copy>
  |     </target>
  |     <target name="compile" depends="init" description="Compile the Java source code">
  |         <javac destdir="${classes.dir}" classpathref="build.classpath" debug="${javac.debug}" deprecation="${javac.deprecation}" nowarn="on">
  |             <src path="${src.java.dir}" />
  |         </javac>
  |     </target>
  |     <target name="war" depends="compile">
  |         <jar destfile="${build.dir}/${name}.war">
  |             <zipfileset refid="war.docroot" />
  |             <zipfileset refid="war.webinf" />
  |             <zipfileset refid="war.webinf.lib" />
  |         </jar>
  |     </target>
  |     <target name="ejb3" depends="compile">
  |         <jar jarfile="${build.dir}/${name}.ejb3">
  |             <fileset dir="${imported.basedir}">
  |                 <include name="${name}.jar" />
  |             </fileset>
  |             <fileset dir="${classes.dir}">
  |                 <include name="**/*.class" />
  |                 <exclude name="**/test/*.class" />
  |             </fileset>
  |             <fileset refid="ejb3.root" />
  |             <fileset refid="ejb3.lib" />
  |         </jar>
  |     </target>
  |     <target name="ear" depends="ejb3, war">
  |         <jar destfile="${build.dir}/${name}.ear">
  |             <zipfileset dir="${build.dir}">
  |                 <include name="${name}.ejb3" />
  |             </zipfileset>
  |             <zipfileset dir="${build.dir}">
  |                 <include name="${name}.war" />
  |             </zipfileset>
  |             <zipfileset refid="ear.resources" />
  |         </jar>
  |     </target>
  |     <target name="deploy" depends="ear">
  |         <property name="unit.ext" value="ear" />
  |         <fail unless="jboss.home">jboss.home MUST be set. Update build.properties to point to a valid JBoss installation.</fail>
  |         <copy todir="${deploy.dir}">
  |             <fileset refid="deploy" />
  |         </copy>
  |         <copy file="${build.dir}/${name}.${unit.ext}" todir="${deploy.dir}" />
  |     </target>
  |     <target name="undeploy">
  |         <property name="unit.ext" value="ear" />
  |         <delete file="${deploy.dir}/${name}.${unit.ext}" />
  |         <delete>
  |             <fileset dir="${deploy.dir}">
  |                 <patternset refid="undeploy" />
  |             </fileset>
  |         </delete>
  |     </target>
  |     <target name="cleandb">
  |         <delete dir="${deploy.dir}/../data/hypersonic" />
  |     </target>
  | </project>
  | 

and here is the application.xml file:

  | <?xml version="1.0" encoding="utf-8"?>
  | <application>
  |     <display-name>SeamApplication</display-name>
  |     <module>
  |         <web>
  |             <web-uri>seamapp.war</web-uri>
  |             <context-root>/seamapp</context-root>
  |         </web>
  |     </module>
  |     <module>
  |         <ejb>seamapp.ejb3</ejb>
  |     </module>
  | </application>
  | 

Best Regards 
ama55

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989166#3989166

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989166



More information about the jboss-user mailing list