<?xml version="1.0"?>
<!--
  ~ 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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.wso2.bpel</groupId>
  <artifactId>ode-dao-jpa</artifactId>
  <name>ODE :: OpenJPA DAO Impl</name>

  <parent>
    <groupId>org.wso2.bpel</groupId>
    <artifactId>ode</artifactId>
    <version>1.3.5-wso2v21</version>
  </parent>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jta_1.1_spec</artifactId>
    </dependency>
    <!--dependency>
      <groupId>javax.persistence</groupId>
      <artifactId>persistence-api</artifactId>
    </dependency-->
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
    </dependency>
    <dependency>
      <groupId>org.wso2.bpel</groupId>
      <artifactId>ode-bpel-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.wso2.bpel</groupId>
      <artifactId>ode-bpel-dao</artifactId>
    </dependency>
    <dependency>
      <groupId>org.wso2.bpel</groupId>
      <artifactId>ode-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
    </dependency>
    <dependency>
        <groupId>xerces</groupId>
        <artifactId>xmlParserAPIs</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.openjpa</groupId>
      <artifactId>openjpa</artifactId>
    </dependency>
    <dependency>
      <groupId>net.sourceforge.serp</groupId>
      <artifactId>serp</artifactId>
    </dependency>
      <dependency>
          <groupId>com.hazelcast</groupId>
          <artifactId>hazelcast</artifactId>
          <version>${orbit.version.hazelcast}</version>
      </dependency>
    </dependencies>


  <build>
    <plugins>

      <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.0.2</version>
                    <configuration>
                        <source>1.5</source>
                        <target>1.6</target>
                    </configuration>

                </plugin>

    <plugin>  
  <groupId>org.bsc.maven</groupId>  
  <artifactId>maven-processor-plugin</artifactId>  
  <version>2.0.5</version>  
  <executions>  
    <execution>  
      <id>process</id>  
      <goals>  
        <goal>process</goal>  
      </goals>  
      <phase>generate-sources</phase>  
      <configuration>  
        <processors>  
          <processor>org.apache.openjpa.persistence.meta.AnnotationProcessor6</processor>  
        </processors>  
        <optionMap>  
          <openjpa.metamodel>true</openjpa.metamodel>  
        </optionMap>  
      </configuration>  
    </execution>  
  </executions>  
</plugin>  
<plugin>  
  <groupId>org.codehaus.mojo</groupId>  
  <artifactId>build-helper-maven-plugin</artifactId>  
  <version>1.7</version>  
  <executions>  
    <execution>  
      <id>add-source</id>  
      <phase>generate-sources</phase>  
      <goals>  
        <goal>add-source</goal>  
      </goals>  
      <configuration>  
        <sources>  
          <source>${project.build.directory}/generated-sources/apt</source>  
        </sources>  
      </configuration>  
    </execution>  
  </executions>  
</plugin>


      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
	<version>1.7</version>
        <executions>
          <execution>
            <id>openjpa-enhancer</id>
            <phase>process-classes</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <property name="maven.runtime.classpath" refid="maven.compile.classpath" />
                <path id="classpath">
           <pathelement path="${maven.runtime.classpath}" />
        </path>
        <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask" classpathref="classpath" />
                <openjpac>
            <fileset dir="${basedir}/src/main">
              <include name="**/*.java" />
            </fileset>
            <classpath>
             <pathelement location="${basedir}/target/classes" />
             <pathelement path="${maven.runtime.classpath}" />
            </classpath>
         </openjpac>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
   </build>


</project>
