extensions/torque/maven.xml (69 lines of code) (raw):

<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- ======================================================================== --> <!-- --> <!-- maven Buildfile --> <!-- --> <!-- $Id$ --> <!-- --> <!-- ======================================================================== --> <project xmlns:j="jelly:core" xmlns:m="maven" xmlns:u="jelly:util" xmlns:maven="jelly:maven" default="jar:jar"> <!-- ================================================================== --> <!-- C O M P I L E P R E - G O A L --> <!-- ================================================================== --> <!-- Before compiling the Turbine Source Code, it is necessary to --> <!-- generate the Torque Peers. This preGoal runs the prepare-sources --> <!-- target. --> <!-- ================================================================== --> <preGoal name="java:compile"> <attainGoal name="prepare-sources"/> <!-- Hack for Maven bug when compiling with a clean target. --> <j:if test="${sourcesPresent != 'true'}"> <j:set var="sourcesPresent" value="true"/> <path id="maven.compile.src.set" location="target/src"/> </j:if> </preGoal> <!-- ================================================================== --> <!-- T O R Q U E - I N I T P R E - G O A L --> <!-- ================================================================== --> <!-- The schema files for the Torque peers must be prepared and some --> <!-- variables added. This must be done before doing any torque work --> <!-- ================================================================== --> <preGoal name="torque:init"> <attainGoal name="copy-om"/> </preGoal> <!-- ================================================================== --> <!-- P R E P A R E S O U R C E S --> <!-- ================================================================== --> <!-- This target builds the torque peers needed to compile the Turbine --> <!-- distribution. If you don't want to build the whole code with --> <!-- maven but use an IDE (e.g. Eclipse), you can run this target and --> <!-- use target/src as your source directory. --> <!-- ================================================================== --> <goal name="prepare-sources" description="Copy Turbine and Torque generated sources to target/src"> <copy todir="target/src"> <fileset dir="src/java"/> </copy> <attainGoal name="generate-om"/> </goal> <!-- ================================================================== --> <!-- T O R Q U E G E N E R A T I O N G O A L --> <!-- ================================================================== --> <!-- Generates only the java classes for the peers of the scheduler and --> <!-- the torque security service --> <!-- ================================================================== --> <goal name="generate-om" description="Generate Torque peer classes in target/src" prereqs="scheduler-om, torque-security-om"/> <!-- ================================================== --> <!-- Prepare all Sources for Torque --> <!-- ================================================== --> <goal name="copy-om" description="Copy all schema files to target/xml and replace database related variables" prereqs="copy-scheduler-om, copy-torque-security-om, copy-id-table-om"/> <!-- ================================================== --> <!-- Prepare Scheduler Sources for Torque --> <!-- ================================================== --> <goal 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"/> </goal> <!-- ================================================== --> <!-- Prepare Torque Security Service Sources for Torque --> <!-- ================================================== --> <goal 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"/> </goal> <!-- ================================================== --> <!-- Prepare ID Table (for idBroker) Sources for Torque --> <!-- ================================================== --> <goal 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"/> </goal> <!-- ================================================== --> <!-- Build Peers for the Scheduler --> <!-- ================================================== --> <goal name="scheduler-om" description="generate Torque peers for the scheduler" prereqs="copy-scheduler-om"> <j:set var="torque.project" value="scheduler"/> <j:set var="torque.schema.om.includes" value="scheduler-schema.xml"/> <j:set var="torque.targetPackage" value="${scheduler.package}"/> <attainGoal name="torque:om"/> </goal> <!-- ================================================== --> <!-- Build Peers for Torque Security --> <!-- ================================================== --> <goal name="torque-security-om" description="generate Torque peers for the torque security service" prereqs="copy-torque-security-om"> <j:set var="torque.project" value="torque-security"/> <j:set var="torque.schema.om.includes" value="torque-security-schema.xml"/> <j:set var="torque.targetPackage" value="${torque.security.package}"/> <attainGoal name="torque:om"/> </goal> </project>