<?xml version="1.0" encoding="UTF-8"?>
<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>
	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>5</version>
	</parent>
    
    <groupId>org.avaje</groupId>
    <artifactId>ebean</artifactId>
    <name>Ebean</name>
    <version>2.7.7</version>
    <packaging>jar</packaging>
    <description>Ebean</description>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <url>http://www.avaje.org</url>
	<licenses>
		<license>
			<name>LGPL version 2.1 or later</name>
			<url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<scm>
		<connection>scm:svn:http://ebeanorm.svn.sourceforge.net/svnroot/ebeanorm/ebean/tags/ebean-2.7.7</connection>
		<developerConnection>scm:svn:https://ebeanorm.svn.sourceforge.net/svnroot/ebeanorm/ebean/tags/ebean-2.7.7</developerConnection>
		<url>http://ebeanorm.svn.sourceforge.net/svnroot/ebeanorm/ebean/tags/ebean-2.7.7</url>
	</scm>
    
    <dependencies>
        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>persistence-api</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>javax.transaction</groupId>
            <artifactId>jta</artifactId>
            <version>1.1</version>
            <scope>provided</scope>            
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>            
        </dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.1</version>
            <scope>provided</scope>			
		</dependency>
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.7.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>1.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>2.10.0-M2</version>
            <scope>provided</scope>
        </dependency>        
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>2.2.1</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.4</version>
            <scope>test</scope>
        </dependency>      
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.3.153</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>8.4-701.jdbc4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
			<groupId>org.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<version>2.0.0</version>
            <scope>test</scope>
        </dependency>        
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.15</version>
            <scope>test</scope>
        </dependency>
<!-- 
     <dependency>
      <groupId>com.oracle</groupId>
      <artifactId>ojdbc5</artifactId>
      <version>11.1.0.7.0</version>
      <scope>test</scope>
    </dependency>
 -->
    </dependencies>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.6.1</version>
                <configuration>
                    <show>public</show>
                    <overview>${basedir}/src/main/java/com/avaje/ebean/overview.html</overview>
                    <stylesheetfile>${basedir}/src/main/java/com/avaje/ebean/stylesheet.css</stylesheetfile>

                    <excludePackageNames>com.avaje.ebean.en*:com.avaje.ebeani*</excludePackageNames>
                    <groups>
                        <group>
                            <title>Public API</title>
                            <packages>
                                com.avaje.ebean:com.avaje.ebean.event:com.avaje.ebean.a*:com.avaje.ebean.b*:com.avaje.ebean.c*:com.avaje.ebean.m*:com.avaje.ebean.t*:com.avaje.ebean.v*
                            </packages>
                        </group>
                        <!--
                      <group> <title>Byte Code Enhancement / Dynamic Proxy
                      Generation</title> <packages>com.avaje.ebean.en*</packages>
                      </group> <group> <title>Internally Focused</title>
                      <packages>com.avaje.ebeani*</packages> </group>
                  -->
                    </groups>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>jdk1.5</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>jdk</name>
                    <value>1.5</value>
                </property>
            </activation>
            <properties>
                <jdkDepSource>1.5</jdkDepSource>
            </properties>
        </profile>
        <profile>
            <id>jdk1.6</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>jdk</name>
                    <value>1.6</value>
                </property>
            </activation>
            <properties>
                <jdkDepSource>1.6</jdkDepSource>
            </properties>
        </profile>
	    <profile>
	      <id>release-sign-artifacts</id>
	      <activation>
	        <property>
	          <name>performRelease</name>
	          <value>true</value>
	        </property>
	      </activation>
	      <build>
	        <plugins>
	          <plugin>
	            <groupId>org.apache.maven.plugins</groupId>
	            <artifactId>maven-gpg-plugin</artifactId>
	            <executions>
	              <execution>
	                <id>sign-artifacts</id>
	                <phase>verify</phase>
	                <goals>
	                  <goal>sign</goal>
	                </goals>
	              </execution>
	            </executions>
	          </plugin>
	        </plugins>
	      </build>
	    </profile>        
    </profiles>

    <!-- Enhance the test classes -->
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                        <verbose>false</verbose>
                        <fork>true</fork>
                        <executable>${JAVA_HOME}/bin/javac</executable>
                        <compilerVersion>1.5</compilerVersion>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                  <groupId>org.eclipse.m2e</groupId>
                  <artifactId>lifecycle-mapping</artifactId>
                  <version>1.0.0</version>
                  <configuration>
                    <lifecycleMappingMetadata>
                      <pluginExecutions>
                        <pluginExecution>
                          <pluginExecutionFilter>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-antrun-plugin</artifactId>
                            <versionRange>[1.7,)</versionRange>
                            <goals>
                              <goal>run</goal>
                            </goals>
                          </pluginExecutionFilter>
                          <action>
                            <ignore />
                          </action>
                        </pluginExecution>
                      </pluginExecutions>
                    </lifecycleMappingMetadata>
                  </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/jdk_${jdkDepSource}/java</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <build-version>${project.version}</build-version>
                        </manifestEntries>

                        <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>enhance-main-classes</id>
                        <phase>process-classes</phase>
                        <configuration>
                            <tasks>
                                <property name="compile_classpath" refid="maven.compile.classpath" />
                                <echo message="Ebean enhancing main classes debug level -----------------------------------" />
                                <echo message="Classpath: ${compile_classpath}" />
                                <taskdef name="ebeanEnhance" classname="com.avaje.ebean.enhance.ant.AntEnhanceTask" classpath="${compile_classpath}" />
                                <ebeanEnhance classSource="${project.build.outputDirectory}" packages="com.avaje.ebean.meta.**" transformArgs="debug=1" />
                            </tasks>
                            <encoding>UTF-8</encoding>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>                
                    <execution>
                        <id>enhance-test-classes</id>
                        <phase>process-test-classes</phase>
                        <configuration>
                            <tasks>
                                <property name="compile_classpath" refid="maven.compile.classpath" />
                                <echo message="Ebean enhancing test classes debug level -----------------------------------" />
                                <echo message="Classpath: ${compile_classpath}" />
                                <taskdef name="ebeanEnhance" classname="com.avaje.ebean.enhance.ant.AntEnhanceTask" classpath="${compile_classpath}" />
                                <ebeanEnhance classSource="${project.build.testOutputDirectory}" packages="com.avaje.tests.**" transformArgs="debug=1" />
                            </tasks>
                            <encoding>UTF-8</encoding>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <useSystemClassLoader>false</useSystemClassLoader>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2-beta-5</version>
                <executions>
                    <execution>
                        <id>main</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <descriptors>
                        <descriptor>src/assemble/distribution.xml</descriptor>
                    </descriptors>
                    <archive>
                        <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.3</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.6.1</version>
                <executions>
                    <execution>
                        <id>main</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <show>public</show>
                    <overview>${basedir}/src/main/java/com/avaje/ebean/overview.html</overview>
                    <stylesheetfile>${basedir}/src/main/java/com/avaje/ebean/stylesheet.css</stylesheetfile>

                    <excludePackageNames>com.avaje.ebean.en*:com.avaje.ebeani*</excludePackageNames>
                    <groups>
                        <group>
                            <title>Public API</title>
                            <packages>
                                com.avaje.ebean:com.avaje.ebean.event:com.avaje.ebean.a*:com.avaje.ebean.b*:com.avaje.ebean.c*:com.avaje.ebean.m*:com.avaje.ebean.t*:com.avaje.ebean.v*
                            </packages>
                        </group>
                        <!--
                      <group> <title>Byte Code Enhancement / Dynamic Proxy
                      Generation</title> <packages>com.avaje.ebean.en*</packages>
                      </group> <group> <title>Internally Focused</title>
                      <packages>com.avaje.ebeani*</packages> </group>
                  -->
                    </groups>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>2.0</version>
                <configuration>
                    <outputEncoding>UTF-8</outputEncoding>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
