| <?xml version="1.0"?> |
| |
| <!-- ===================================================================== --> |
| <!-- = = --> |
| <!-- = This is a helper file to build Turbine 2 with Eclipse = --> |
| <!-- = = --> |
| <!-- = @author <a href="hps@intermeta.de">Henning P. Schmiedehausen</a> = --> |
| <!-- = @version $Id$ = --> |
| <!-- = = --> |
| <!-- ===================================================================== --> |
| |
| <project name="Turbine Torque Peers" basedir="../.." default="prepare-turbine"> |
| |
| <property name="libdir" value="target/lib"/> |
| |
| <target name="prepare-turbine" |
| depends="fetch-jars, peers" description="==> Default Target. Run me to prepare the Turbine source code for Eclipse"/> |
| |
| <target name="torque-init"> |
| <property name="torque.contextProperties" value="project.properties"/> |
| <property file="${torque.contextProperties}"/> |
| |
| <path id="torque-classpath"> |
| <fileset dir="${libdir}"/> |
| </path> |
| |
| <!-- |
| The default.properties file will map old properties to the new ones along |
| with setting the correct defaults. |
| --> |
| <property resource="org/apache/torque/default.properties"> |
| <classpath> |
| <path refid="torque-classpath"/> |
| </classpath> |
| </property> |
| |
| <taskdef |
| name="torque-data-model" |
| classpathref="torque-classpath" |
| classname="org.apache.torque.task.TorqueDataModelTask"/> |
| </target> |
| |
| <!-- ================================================== --> |
| <!-- Build the Torque Peers for the Turbine builds --> |
| <!-- ================================================== --> |
| <target name="peers" description="==> Builds the Turbine Torque Peer classes" |
| depends="torque-init"> |
| <antcall target="copy-om"/> |
| <antcall target="scheduler-om"/> |
| <antcall target="torque-security-om"/> |
| |
| <!-- Kludge, because this file is overwritten by the Turbine code itself --> |
| <delete file="${torque.java.dir}/org/apache/turbine/services/schedule/JobEntry.java"/> |
| </target> |
| |
| |
| <!-- ================================================== --> |
| <!-- Prepare all Sources for Torque --> |
| <!-- ================================================== --> |
| <target name="copy-om" description="Copy all schema files to target/xml and replace database related variables" |
| depends="copy-scheduler-om ,copy-torque-security-om, copy-id-table-om"/> |
| |
| <!-- ================================================== --> |
| <!-- Prepare Scheduler Sources for Torque --> |
| <!-- ================================================== --> |
| <target name="copy-scheduler-om" description="Copy scheduler schema files to target/xml and replace database related variables"> |
| <filter token="DATABASE_DEFAULT" value="${scheduler.database.name}"/> |
| <filter token="EXTRA_USER_COLUMNS" value="${scheduler.extra.user.columns}"/> |
| <copy |
| file="src/schema/scheduler-schema.xml" |
| tofile="${torque.schema.dir}/scheduler-schema.xml" |
| filtering="yes"/> |
| </target> |
| |
| <!-- ================================================== --> |
| <!-- Prepare Torque Security Service Sources for Torque --> |
| <!-- ================================================== --> |
| <target name="copy-torque-security-om" description="Copy torque security service schema files to target/xml and replace database related variables"> |
| <filter token="DATABASE_DEFAULT" value="${torque.security.database.name}"/> |
| <copy |
| file="src/schema/torque-security-schema.xml" |
| tofile="${torque.schema.dir}/torque-security-schema.xml" |
| filtering="yes"/> |
| </target> |
| |
| <!-- ================================================== --> |
| <!-- Prepare ID Table (for idBroker) Sources for Torque --> |
| <!-- ================================================== --> |
| <target name="copy-id-table-om" description="Copy id-table schema files to target/xml and replace database related variables"> |
| <filter token="DATABASE_DEFAULT" value="${scheduler.database.name}"/> |
| <copy |
| file="src/schema/id-table-schema.xml" |
| tofile="${torque.schema.dir}/scheduler-idtable-schema.xml" |
| filtering="yes"/> |
| <filter token="DATABASE_DEFAULT" value="${torque.security.database.name}"/> |
| <copy |
| file="src/schema/id-table-schema.xml" |
| tofile="${torque.schema.dir}/torque-security-idtable-schema.xml" |
| filtering="yes"/> |
| </target> |
| |
| <!-- ================================================== --> |
| <!-- Build Peers for the Scheduler --> |
| <!-- ================================================== --> |
| <target name="scheduler-om" description="generate Torque peers for the scheduler" |
| depends="copy-scheduler-om"> |
| |
| <torque-data-model |
| contextProperties="${torque.contextProperties}" |
| controlTemplate="${torque.template.om}" |
| outputDirectory="${torque.java.dir}" |
| outputFile="report.scheduler.om.generation" |
| targetDatabase="${torque.database}" |
| targetPackage="${scheduler.package}" |
| useClasspath="true"> |
| <fileset dir="${torque.schema.dir}" |
| includes="scheduler-schema.xml" |
| excludes="${torque.schema.om.excludes}" |
| /> |
| </torque-data-model> |
| |
| </target> |
| |
| <!-- ================================================== --> |
| <!-- Build Peers for Torque Security --> |
| <!-- ================================================== --> |
| <target name="torque-security-om" description="generate Torque peers for the torque security service" |
| depends="copy-torque-security-om"> |
| |
| <torque-data-model |
| contextProperties="${torque.contextProperties}" |
| controlTemplate="${torque.template.om}" |
| outputDirectory="${torque.java.dir}" |
| outputFile="report.torque-security.om.generation" |
| targetDatabase="${torque.database}" |
| targetPackage="${torque.security.package}" |
| useClasspath="true"> |
| <fileset dir="${torque.schema.dir}" |
| includes="torque-security-schema.xml" |
| excludes="${torque.schema.om.excludes}" |
| /> |
| </torque-data-model> |
| |
| </target> |
| |
| <!-- ================================================== --> |
| <!-- Fetch all needed jars from ibiblio --> |
| <!-- ================================================== --> |
| <target name="fetch-jars" description=" ==> Fetch the needed jars for Turbine"> |
| <mkdir dir="${libdir}"/> |
| <antcall target="fetch-sun-jars" /> |
| <antcall target="fetch-ibiblio-jars" /> |
| </target> |
| |
| <target name="check-sun-jars"> |
| <condition property="sunjars.present"> |
| <and> |
| <available file="${libdir}/activation-1.0.2.jar" type="file"/> |
| <available file="${libdir}/javamail-1.3.jar" type="file"/> |
| <available file="${libdir}/jdbc-2.0.jar" type="file"/> |
| <available file="${libdir}/jndi-1.2.1.jar" type="file"/> |
| </and> |
| </condition> |
| </target> |
| |
| <target name="fetch-sun-jars" unless="sunjars.present" depends="check-sun-jars"> |
| <fail> |
| For a successful build, you must get the following jars from java.sun.com |
| and copy them into ${libdir}: |
| |
| activation.jar, Version 1.0.2 as activation-1.0.2.jar |
| mail.jar, Version 1.3 as javamail-1.3.jar |
| jdbc.jar, Version 2.0 as jdbc-2.0.jar |
| jndi.jar, Version 1.2.1 as jndi-1.2.1.jar |
| |
| One of these jars is missing. Please correct this error and |
| rebuild. |
| </fail> |
| </target> |
| |
| <target name="fetch-ibiblio-jars"> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/avalon-framework/jars/avalon-framework-4.1.4.jar" dest="${libdir}/avalon-framework-4.1.4.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-beanutils/jars/commons-beanutils-1.6.1.jar" dest="${libdir}/commons-beanutils-1.6.1.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-codec/jars/commons-codec-1.1.jar" dest="${libdir}/commons-codec-1.1.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-collections/jars/commons-collections-2.1.jar" dest="${libdir}/commons-collections-2.1.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-configuration/jars/commons-configuration-20030706.202021.jar" dest="${libdir}/commons-configuration-20030706.202021.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-digester/jars/commons-digester-1.5.jar" dest="${libdir}/commons-digester-1.5.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-email/jars/commons-email-20030310.165926.jar" dest="${libdir}/commons-email-20030310.165926.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-fileupload/jars/commons-fileupload-1.0.jar" dest="${libdir}/commons-fileupload-1.0.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-1.0.1.jar" dest="${libdir}/commons-lang-1.0.1.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.3.jar" dest="${libdir}/commons-logging-1.0.3.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-pool/jars/commons-pool-1.0.1.jar" dest="${libdir}/commons-pool-1.0.1.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/dom4j/jars/dom4j-1.4.jar" dest="${libdir}/dom4j-1.4.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/ecs/jars/ecs-1.4.2.jar" dest="${libdir}/ecs-1.4.2.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/excalibur-component/jars/excalibur-component-1.1.jar" dest="${libdir}/excalibur-component-1.1.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/excalibur-instrument/jars/excalibur-instrument-1.0.jar" dest="${libdir}/excalibur-instrument-1.0.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/excalibur-logger/jars/excalibur-logger-1.0.1.jar" dest="${libdir}/excalibur-logger-1.0.1.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/excalibur-pool/jars/excalibur-pool-1.2.jar" dest="${libdir}/excalibur-pool-1.2.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/jython/jars/jython-2.1.jar" dest="${libdir}/jython-2.1.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/log4j/jars/log4j-1.2.8.jar" dest="${libdir}/log4j-1.2.8.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/logkit/jars/logkit-1.0.1.jar" dest="${libdir}/logkit-1.0.1.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/oro/jars/oro-2.0.7.jar" dest="${libdir}/oro-2.0.7.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/servletapi/jars/servletapi-2.3.jar" dest="${libdir}/servletapi-2.3.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/stratum/jars/stratum-1.0-b3.jar" dest="${libdir}/stratum-1.0-b3.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/torque/jars/torque-3.1-alpha2.jar" dest="${libdir}/torque-3.1-alpha2.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/torque/jars/torque-gen-3.1-alpha2.jar" dest="${libdir}/torque-gen-3.1-alpha2.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/velocity/jars/velocity-1.3.1.jar" dest="${libdir}/velocity-1.3.1.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/village/jars/village-2.0-dev-20030625.jar" dest="${libdir}/village-2.0-dev-20030625.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/xalan/jars/xalan-2.5.1.jar" dest="${libdir}/xalan-2.5.1.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/xerces/jars/xercesImpl-2.4.0.jar" dest="${libdir}/xercesImpl-2.4.0.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-1.0.b2.jar" dest="${libdir}/xml-apis-1.0.b2.jar"/> |
| <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/xmlrpc/jars/xmlrpc-1.2-b1.jar" dest="${libdir}/xmlrpc-1.2-b1.jar"/> |
| </target> |
| </project> |