<?xml version="1.0"?>
<!--
Copyright 2004 The Apache Software Foundation

Licensed 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 name="maven" default="maven:jar" basedir=".">

  <!-- Give user a chance to override without editing this file
       (and without typing -D each time they invoke a target) -->

  <!-- Allow any user specific values to override the defaults -->
  <property file="${user.home}/build.properties" />
  <!-- Allow user defaults for this project -->
  <property file="build.properties" />
  <!-- Set default values for the build -->
  <property file="project.properties" />



  <!-- ================================================================== -->
  <!-- JETSPEED CUSTOM DELEGATORS                                         -->
  <!-- Add calls here to jetspeed specific targets                        -->
  <!-- ================================================================== -->
        
    <target 
      name="apis">
      <ant antfile="build/build.xml" target="apis"/>
    </target>
        
    <target 
      name="war">
      <ant antfile="build/build.xml" target="war"/>
    </target>
        
    <target 
      name="install">
      <ant antfile="build/build.xml" target="install"/>
    </target>
        
    <target 
      name="deploy">
      <ant antfile="build/build.xml" target="deploy"/>
    </target>
        


  <!-- maven:start -->
  
  <!-- ================================================================== -->
  <!-- D E L E G A T O R S                                                -->
  <!-- ================================================================== -->
        
    <target 
      name="maven:site">
      <ant antfile="${maven.home}/build-docs.xml" target="site"/>
    </target>
        
    <target 
      name="maven:jar"
      depends="apis">

      <echo>
          NOTE: You need to have installed maven before using this script.
          NOTE:  This is the new maven build system for jetspeed - integration is still progressing
           so please bear with us.
          NOTE: This does not currently work - but if you see the problem - please let us know!
          NOTE: Current problem - the ojb/soap/uddi4j jars do not get downloaded by update-jars, so copy them manually
      </echo>

      <ant antfile="${maven.home}/build-maven.xml" target="jar"/>
    </target>
        
    <target 
      name="maven:install-jar">
      <ant antfile="${maven.home}/build-maven.xml" target="install-jar"/>
    </target>
        
    <target 
      name="maven:env">
      <ant antfile="${maven.home}/build-maven.xml" target="env"/>
    </target>
        
    <target 
      name="maven:docs">
      <ant antfile="${maven.home}/build-docs.xml" target="docs"/>
    </target>
        
    <target 
      name="maven:test">
      <ant antfile="${maven.home}/build-test.xml" target="test"/>
    </target>

    <target 
      name="maven:iutest">
      <ant antfile="${maven.home}/build-iutest.xml" target="test"/>
    </target>

    <target 
      name="maven:singletest">
      <ant antfile="${maven.home}/build-test.xml" target="run-singletest"/>
    </target>
          
    <target 
      name="maven:clean">
      <ant antfile="${maven.home}/build-maven.xml" target="clean"/>
    </target>
        
    <target 
      name="maven:metrics">
      <ant antfile="${maven.home}/build-metrics.xml" target="metrics"/>
    </target>
        
    <target 
      name="maven:dist">
      <ant antfile="${maven.home}/build-maven.xml" target="dist"/>
    </target>
        
    <target 
      name="maven:deploy-site">
      <ant antfile="${maven.home}/build-docs.xml" target="deploy-site"/>
    </target>
        
    <target 
      name="maven:gump-descriptor">
      <ant antfile="${maven.home}/build-maven.xml" target="gump-descriptor"/>
    </target>
        
    <target 
      name="maven:javadocs">
      <ant antfile="${maven.home}/build-docs.xml" target="javadocs"/>
    </target>
        
    <target 
      name="maven:compile"
      depends="apis">
      <ant antfile="${maven.home}/build-maven.xml" target="compile"/>
    </target>
        
    <target 
      name="maven:update-jars">
      <ant antfile="${maven.home}/build-maven.xml" target="update-jars"/>
    </target>
    
  <!-- maven:end -->
   
  <!-- POSTGRES Test -->
    <target name='drops'>
       <sql driver="org.postgresql.Driver" url="jdbc:postgresql://75.32.148.173:5432/j1"
             userid="dave" password="dave@101H"
             src="./src/sql/external/drops.sql"
             autocommit="true"
             onerror='continue'
             >
          <classpath>
            <pathelement path="/bluesunrise/apache/jdbc/postgresql-8.1-407.jdbc3.jar"/>
          </classpath>
        </sql>        
    </target>
    <target name='ddl'>
       <sql driver="org.postgresql.Driver" url="jdbc:postgresql://75.32.148.173:5432/j1"
             userid="dave" password="dave@101H"
             src="./src/sql/external/turbine-postgres.sql"
             autocommit="true"
             onerror='continue'
             >
          <classpath>
            <pathelement path="/bluesunrise/apache/jdbc/postgresql-8.1-407.jdbc3.jar"/>
          </classpath>
        </sql>        
    </target>
    <target name='populate'>
       <sql driver="org.postgresql.Driver" url="jdbc:postgresql://75.32.148.173:5432/j1"
             userid="dave" password="dave@101H"
             src="./src/sql/external/populate-postgres.sql"
             autocommit="true"
             onerror='continue'
             >
          <classpath>
            <pathelement path="/bluesunrise/apache/jdbc/postgresql-8.1-407.jdbc3.jar"/>
          </classpath>
        </sql>        
    </target>
    
</project>
