<?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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<parent>
		<artifactId>fulcrum-security</artifactId>
		<groupId>org.apache.fulcrum</groupId>
		<version>1.1.0</version>
        <relativePath>../pom.xml</relativePath>
	</parent>
	<modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.fulcrum</groupId>
  <artifactId>fulcrum-security-torque</artifactId>
  <version>1.1.0</version>
  <name>Fulcrum Security Torque Impl</name>
  <description>
    Fulcrum Security Torque Impl is an implementation of the Fulcrum Security API
    that uses Apache DB Torque as a database backend.
  </description>
  <url>http://turbine.apache.org/fulcrum/fulcrum-security/fulcrum-security-torque</url>
  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/turbine/fulcrum/tags/fulcrum-security-1.1.0/torque</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/turbine/fulcrum/tags/fulcrum-security-1.1.0/torque</developerConnection>
    <url>http://svn.apache.org/viewvc/turbine/fulcrum/tags/fulcrum-security-1.1.0/torque</url>
  </scm>
  
  <build>
    <sourceDirectory>src/java</sourceDirectory>
    <testSourceDirectory>src/test</testSourceDirectory>
  
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <forkMode>perTest</forkMode>
        </configuration>
      </plugin>
    </plugins>
  </build>
  
  <dependencies>
    <dependency>
      <groupId>org.apache.fulcrum</groupId>
      <artifactId>fulcrum-security-api</artifactId>
      <version>1.1.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.torque</groupId>
        <artifactId>torque-runtime</artifactId>
        <version>4.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.fulcrum</groupId>
        <artifactId>fulcrum-security-api</artifactId>
        <version>1.1.0</version>
        <type>test-jar</type>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>1.8.0.7</version>
        <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.fulcrum</groupId>
        <artifactId>fulcrum-testcontainer</artifactId>
        <version>1.0.6</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.fulcrum</groupId>
        <artifactId>fulcrum-yaafi</artifactId>
        <version>1.0.6</version>
        <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>torque-generate-off</id>
    </profile>
    <profile>
      <id>torque-generate</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.torque</groupId>
            <artifactId>torque-maven-plugin</artifactId>
            <version>4.0</version>
            <executions>
              <execution>
                <id>torque-om</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.om</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>mysql</torque.database>
                    <torque.om.package>org.apache.fulcrum.security.torque.om</torque.om.package>
                    <torque.om.addGetByNameMethods>false</torque.om.addGetByNameMethods>
                    <torque.om.save.saveException>TorqueException</torque.om.save.saveException>
                    <torque.om.useIsForBooleanGetters>true</torque.om.useIsForBooleanGetters>
                  </options>
                  <outputDirMap>
                    <modifiable>${project.build.sourceDirectory}</modifiable>
                  </outputDirMap>
                </configuration>
              </execution>
              <execution>
                <id>torque-sql-mysql</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.sql</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/mysql</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>mysql</torque.database>
                  </options>
                </configuration>
              </execution>
              <execution>
                <id>torque-sql-hsqldb</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.sql</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/hsqldb</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>hsqldb</torque.database>
                  </options>
                </configuration>
              </execution>
              <execution>
                <id>torque-sql-derby</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.sql</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/derby</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>derby</torque.database>
                  </options>
                </configuration>
              </execution>
              <execution>
                <id>torque-sql-oracle</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.sql</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/oracle</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>oracle</torque.database>
                  </options>
                </configuration>
              </execution>
              <execution>
                <id>torque-sql-postgresql</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.sql</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/postgresql</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>postgresql</torque.database>
                  </options>
                </configuration>
              </execution>
              <execution>
                <id>torque-sql-mssql</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.sql</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/mssql</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>mssql</torque.database>
                  </options>
                </configuration>
              </execution>
              
              <execution>
                <id>torque-idtable-mysql</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.idtable</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/mysql</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>mysql</torque.database>
                  </options>
                </configuration>
              </execution>
              <execution>
                <id>torque-idtable-hsqldb</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.idtable</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/hsqldb</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>hsqldb</torque.database>
                  </options>
                </configuration>
              </execution>
              <execution>
                <id>torque-idtable-derby</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.idtable</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/derby</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>derby</torque.database>
                  </options>
                </configuration>
              </execution>
              <execution>
                <id>torque-idtable-oracle</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.idtable</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/oracle</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>oracle</torque.database>
                  </options>
                </configuration>
              </execution>
              <execution>
                <id>torque-idtable-postgresql</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.idtable</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/postgresql</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>postgresql</torque.database>
                  </options>
                </configuration>
              </execution>
              <execution>
                <id>torque-idtable-mssql</id>
                <phase>package</phase>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <packaging>classpath</packaging>
                  <configPackage>org.apache.torque.templates.idtable</configPackage>
                  <sourceDir>${project.basedir}/schema</sourceDir>
                  <defaultOutputDir>${project.build.directory}/generated-sql/torque/mssql</defaultOutputDir>
                  <defaultOutputDirUsage>none</defaultOutputDirUsage>
                  <loglevel>error</loglevel>
                  <options>
                    <torque.database>mssql</torque.database>
                  </options>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.apache.torque</groupId>
                <artifactId>torque-templates</artifactId>
                <version>4.0</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
