<project
  xmlns:j="jelly:core"
  xmlns:m="maven"
  xmlns:codeswitcher="codeswitcher">
<!--
#/* Copyright 2002-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.
 */
-->

  <!-- ================================================================== -->
  <!-- C O D E S W I T C H E R  P R E  G O A L                            --> 
  <!-- ================================================================== -->
  <!-- This pregoal uses the codeswitcher Maven plugin to process the     -->
  <!-- sources for various JDK and JDBC versions.                         -->
  <!--                                                                    -->
  <!-- Currently you must place something like the following in your      -->
  <!-- ~/build.properties:                                                -->
  <!--                                                                    -->
  <!-- ojbOnSwitches = JDK13                                              -->
  <!-- ojbOffSwitches = JDBC30                                            -->
  <!--                                                                    -->
  <!-- Maven will soon add support for JDK detection by lifting some Ant  -->
  <!-- but for now you have to set the preprocessor flags manually.       -->
  <!-- ================================================================== -->

  <preGoal name="java:compile">

    <path id="maven.compile.src.set">
      <pathelement location="${pom.build.SourceDirectory}"/>
    </path>

    <echo>Generating sources ...</echo>

    <copy todir="${pom.build.sourceDirectory}" overwrite="yes">
      <fileset dir="src/java"/>
    </copy>
    
    <attainGoal name="codeswitcher:init"/>
    
    <codeswitcher:process
      onSwitches="${ojbOnSwitches}"
      offSwitches="${ojbOffSwitches}"
      directory="${pom.build.sourceDirectory}"
    />
    
  </preGoal>

</project>
