User: user57 Date: 01/10/02 14:34:56 Modified: . build.xml Log: o moved jboss-website/website/survey to jboss-website/survey (it's own module) Revision Changes Path 1.2 +294 -13 website-survey/build.xml Index: build.xml =================================================================== RCS file: /cvsroot/jboss/website-survey/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- build.xml 2001/10/01 20:55:33 1.1 +++ build.xml 2001/10/02 21:34:55 1.2 @@ -10,7 +10,7 @@ <!-- --> <!-- ====================================================================== --> -<!-- $Id: build.xml,v 1.1 2001/10/01 20:55:33 user57 Exp $ --> +<!-- $Id: build.xml,v 1.2 2001/10/02 21:34:55 user57 Exp $ --> <project default="main" name="JBoss Website/Survey"> @@ -159,36 +159,69 @@ <pathelement path="${junit.junit.lib}/junit.jar"/> </path> + <!-- JavaMail --> + <property name="sun.javamail.root" value="${project.thirdparty}/sun/javamail"/> + <property name="sun.javamail.lib" value="${sun.javamail.root}/lib"/> + <path id="sun.javamail.classpath"> + <pathelement path="${sun.javamail.lib}/mail.jar"/> + </path> + + <!-- Servlets --> + <property name="sun.servlet.root" value="${project.thirdparty}/sun/servlet"/> + <property name="sun.servlet.lib" value="${sun.servlet.root}/lib"/> + <path id="sun.servlet.classpath"> + <pathelement path="${sun.servlet.lib}/servlet.jar"/> + </path> + + <!-- Log4j --> + <property name="apache.log4j.root" value="${project.thirdparty}/apache/log4j"/> + <property name="apache.log4j.lib" value="${apache.log4j.root}/lib"/> + <path id="apache.log4j.classpath"> + <pathelement path="${apache.log4j.lib}/log4j.jar"/> + </path> + <!-- The combined library classpath --> <path id="library.classpath"> + <path refid="sun.javamail.classpath"/> + <path refid="sun.servlet.classpath"/> + <path refid="apache.log4j.classpath"/> </path> </target> <!-- Configure the external modules which this module depends on. --> <target name="_configure-modules" unless="configure-modules.disable"> + <!-- J2EE --> + <property name="jboss.j2ee.root" value="${project.root}/j2ee/output"/> + <property name="jboss.j2ee.lib" value="${jboss.j2ee.root}/lib"/> + <path id="jboss.j2ee.classpath"> + <pathelement path="${jboss.j2ee.lib}/jboss-j2ee.jar"/> + </path> + + <!-- Website (for .jsp includes) --> + <property name="jboss.website.root" value="${project.root}/website/output"/> + <property name="jboss.website.docs" value="${jboss.website.root}/docs"/> + <!-- The combined dependent module classpath --> <path id="dependentmodule.classpath"> + <path refid="jboss.j2ee.classpath"/> </path> </target> <!-- Configure the tasks used by this module. --> <target name="_configure-tasks" unless="configure-tasks.disable"> <!-- Where source files live --> - <property name="source.bin" value="${module.source}/bin"/> + <property name="source.java" value="${module.source}/main"/> <property name="source.metadata" value="${module.source}/metadata"/> - <property name="source.examples" value="${module.source}/examples"/> - <property name="source.stylesheets" value="${module.source}/stylesheets"/> - <property name="source.docs" value="${module.source}/docs"/> - <property name="source.xdocs" value="${module.source}/xdocs"/> + <property name="source.database" value="${module.source}/database"/> + <property name="source.web" value="${module.source}/web"/> <!-- Where build generated files will go --> - <property name="build.bin" value="${module.output}/bin"/> <property name="build.metadata" value="${module.output}/metadata"/> - <property name="build.snapshots" value="${module.output}/snapshots"/> - <property name="build.docs" value="${module.output}/docs"/> - <property name="build.xdocs" value="${module.output}/xdocs"/> - <property name="build.stylesheets" value="${module.output}/stylesheets"/> + <property name="build.web" value="${module.output}/web"/> + <property name="build.database" value="${module.output}/database"/> <property name="build.lib" value="${module.output}/lib"/> + <property name="build.beans" value="${module.output}/beans"/> + <property name="build.classes" value="${module.output}/classes"/> <!-- Install/Release structure --> <property name="install.id" value="${module.name}-${module.version}"/> @@ -227,6 +260,18 @@ <property name="junit.timeout" value="240000"/> <!-- 4 minutes --> <property name="junit.batchtest.todir" value="${build.reports}"/> <property name="junit.jvm.options" value="-Ddummy"/> + + <!-- XDoclet --> + <path id="xdoclet.task.classpath"> + <path refid="javac.classpath"/> + <pathelement location="${project.tools}/lib/xdoclet.jar"/> + <pathelement location="${project.tools}/lib/ant.jar"/> + </path> + <taskdef name="xdoclet" classname="xdoclet.ejb.EjbDocletTask"/> + + <!-- Typemapping and Datasource for generated beans --> + <property name="survey.bean.typemapping" value="PostgreSQL"/> + <property name="survey.bean.datasource" value="java:/SurveyDS"/> </target> @@ -243,7 +288,81 @@ --> <target name="compile" description="Compile all source files." - depends="init"/> + depends="init, + compile-bean-sources, + compile-classes, + compile-metadata, + compile-database"/> + + <!-- Compile EJB beans with XDoclet --> + <target name="compile-bean-sources" depends="init"> + <mkdir dir="${build.beans}"/> + <mkdir dir="${build.metadata}"/> + <xdoclet sourcepath="${source.java}" + destdir="${build.beans}" + classpathref="xdoclet.task.classpath" + ejbspec="1.1" + excludedtags="@version,@author"> + <dataobject/> + <remoteinterface/> + <homeinterface/> + <entitypk/> + <entitybmp/> + <entitycmp/> + <session/> + <deploymentdescriptor xmlencoding="UTF-8" + destdir="${build.metadata}"/> + <jboss xmlencoding="UTF-8" + destdir="${build.metadata}" + typemapping="${survey.bean.typemapping}" + datasource="${survey.bean.datasource}"/> + + <fileset dir="${source.java}"> + <include name="org/jboss/survey/ejb/**/*Bean.java"/> + </fileset> + </xdoclet> + </target> + + <!-- Compile all class files --> + <target name="compile-classes" depends="init"> + <mkdir dir="${build.classes}"/> + <javac destdir="${build.classes}" + optimize="${javac.optimize}" + target="${javac.target}" + debug="${javac.debug}" + depend="${javac.depend}" + verbose="${javac.verbose}" + deprecation="${javac.deprecation}" + includeAntRuntime="${javac.include.ant.runtime}" + includeJavaRuntime="${javac.include.java.runtime}" + failonerror="${javac.fail.onerror}"> + <src path="${source.java}"/> + <src path="${build.beans}"/> + <classpath refid="javac.classpath"/> + <include name="${javac.includes}"/> + <exclude name="${javac.excludes}"/> + </javac> + </target> + + <!-- Compile metadata files --> + <target name="compile-metadata" depends="init"> + <mkdir dir="${build.metadata}"/> + <copy todir="${build.metadata}" filtering="yes"> + <fileset dir="${source.metadata}"> + <include name="**/*"/> + </fileset> + </copy> + </target> + + <!-- Compile database files --> + <target name="compile-database" depends="init"> + <mkdir dir="${build.database}"/> + <copy todir="${build.database}" filtering="yes"> + <fileset dir="${source.database}"> + <include name="**/*"/> + </fileset> + </copy> + </target> <!-- ================================================================== --> @@ -255,6 +374,123 @@ --> <target name="jars" depends="compile" description="Builds all jar files."> <mkdir dir="${build.lib}"/> + + <!-- build survey.jar --> + <ejbjar descriptordir="${build.metadata}" + srcdir="${build.classes}" + destdir="${build.lib}" + basejarname="survey" + basenameterminator="-" + genericjarsuffix=".jar" + flatdestdir="true"> + <classpath> + <path refid="javac.classpath"/> + <pathelement location="${build.classes}"/> + </classpath> + + <include name="ejb-jar.xml"/> + <jboss destdir="${build.lib}"/> + + <support dir="${build.classes}"> + <include name="org/jboss/survey/ejb/**/*.class"/> + <include name="org/jboss/survey/exception/**/*.class"/> + </support> + </ejbjar> + + <!-- build survey-client.jar --> + <jar jarfile="${build.lib}/survey-client.jar"> + <fileset dir="${build.classes}"> + <include name="org/jboss/survey/command/**/*.class"/> + <include name="org/jboss/survey/util/**/*.class"/> + <include name="org/jboss/survey/ejb/**/*Data.class"/> + <include name="org/jboss/survey/ejb/**/*Management.class"/> + <include name="org/jboss/survey/ejb/**/*ManagementHome.class"/> + <include name="org/jboss/survey/exception/**/*.class"/> + </fileset> + </jar> + + <!-- build survey.war --> + <war warfile="${build.lib}/survey.war" + webxml="${build.metadata}/survey-web.xml"> + <lib dir="${build.lib}"> + <include name="survey-client.jar"/> + </lib> + <fileset dir="${source.web}/survey"> + <include name="**"/> + </fileset> + + <!-- + | include the jsp includes... + | don't really like this, must be a better way. + --> + + <fileset dir="${jboss.website.docs}"> + <include name="head.jsp"/> + <include name="navigation.jsp"/> + <include name="slogan.jsp"/> + </fileset> + </war> + + <!-- build survey.war --> + <war warfile="${build.lib}/survey.war" + webxml="${build.metadata}/survey-web.xml"> + <lib dir="${build.lib}"> + <include name="survey-client.jar"/> + </lib> + <fileset dir="${source.web}/survey"> + <include name="**"/> + </fileset> + + <!-- + | include the jsp includes... + | don't really like this, must be a better way. + --> + + <fileset dir="${jboss.website.docs}"> + <include name="head.jsp"/> + <include name="navigation.jsp"/> + <include name="slogan.jsp"/> + </fileset> + </war> + + <!-- build survey-helper.war --> + <war warfile="${build.lib}/survey-helper.war" + webxml="${build.metadata}/survey-helper-web.xml"> + <lib dir="${build.lib}"> + <include name="survey-client.jar"/> + </lib> + <fileset dir="${source.web}/survey-helper"> + <include name="**"/> + </fileset> + + <!-- + | include the jsp includes... + | don't really like this, must be a better way. + --> + + <fileset dir="${jboss.website.docs}"> + <include name="head.jsp"/> + <include name="navigation.jsp"/> + <include name="slogan.jsp"/> + </fileset> + </war> + + <!-- build survey.ear --> + <ear earfile="${build.lib}/survey.ear" + appxml="${build.metadata}/survey-application.xml"> + <fileset dir="${build.lib}"> + <include name="survey.jar"/> + <include name="survey.war"/> + </fileset> + </ear> + + <!-- build survey-helper.ear --> + <ear earfile="${build.lib}/survey-helper.ear" + appxml="${build.metadata}/survey-helper-application.xml"> + <fileset dir="${build.lib}"> + <include name="survey-helper.war"/> + </fileset> + </ear> </target> @@ -268,8 +504,53 @@ | This target should depend on other docs-* targets for each | different type of docuementation that is to be generated. --> + + <target name="docs" description="Builds all documentation." + depends="init, + docs-api"/> + + <!-- Javadocs is an exception, but provide a docs-api to conform. --> + <target name="docs-api" depends="docs-javadocs"/> + + <!-- + | Check if we need to build javadocs + | + | Javadocs will only be generated if one or more .java source files + | is newer than the generated index.html. + --> + + <target name="docs-javadocs-check" depends="init"> + <!-- if index.html is newer than the sources we are up to date --> + <uptodate property="docs-javadocs.disable" + targetfile="${build.api}/index.html"> + <srcfiles dir="${source.java}" includes="**/*.java"/> + </uptodate> + </target> + + <!-- Generate Javadoc if we are out of date --> + <target name="docs-javadocs" depends="docs-javadocs-check" unless="docs-javadocs.disable"> + <mkdir dir="${build.api}"/> + <javadoc packagenames="${javadoc.packages}" + sourcepath="${source.java}" + destdir="${build.api}" + classpathref="javadoc.classpath" + windowtitle="${javadoc.windowtitle}" + splitindex="${javadoc.splitindex}" + doctitle="${javadoc.doctitle}" + author="${javadoc.author}" + version="${javadoc.version}" + public="${javadoc.public}" + package="${javadoc.package}" + protected="${javadoc.protected}" + private="${javadoc.private}" + encoding="${javadoc.encoding}" + use="${javadoc.use}" + verbose="${javadoc.verbose}"> + <!-- <group title="group name" packages="org.jboss.*"/> --> + </javadoc> + </target> - <target name="docs" depends="init" description="Builds all documentation."/> + <target name="javadocs" depends="docs-javadocs"/> <!-- ================================================================== -->
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development