<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>
    <artifactId>activejdbc</artifactId>
    <packaging>jar</packaging>
    <version>2.0</version>
    <name>JavaLite - ActiveJDBC ORM Framework</name>


    <parent>
        <groupId>org.javalite</groupId>
        <artifactId>activejdbc-root</artifactId>
        <version>2.0</version>
    </parent>

    <!-- Default to H2 if no profile provided -->
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jdbc.driver>org.h2.Driver</jdbc.driver>
        <jdbc.url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</jdbc.url>
        <jdbc.user>sa</jdbc.user>
        <jdbc.password />
        <db>h2</db>
    </properties>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>h2</id>
            <!--
                Configure jdbc.driver, jdbc.url, jdbc.user, jdbc.password
                and db properties in your ~/.m2/settings.xml
            -->
            <dependencies>
                <dependency>
                    <groupId>com.h2database</groupId>
                    <artifactId>h2</artifactId>
                    <version>1.3.171</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>mssql</id>
            <!--
                Configure jdbc.driver, jdbc.url, jdbc.user, jdbc.password
                and db properties in your ~/.m2/settings.xml
            -->
            <dependencies>
                <!-- If Microsoft were at all helpful. -->
                <dependency>
                    <groupId>com.microsoft.sqljdbc</groupId>
                    <artifactId>sqljdbc4</artifactId>
                    <version>4.0.3</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>mysql</id>
            <!--
                Configure jdbc.driver, jdbc.url, jdbc.user, jdbc.password
                and db properties in your ~/.m2/settings.xml
            -->
            <dependencies>
                <dependency>
                    <groupId>mysql</groupId>
                    <artifactId>mysql-connector-java</artifactId>
                    <version>5.1.25</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>oracle</id>
            <!--
                Configure jdbc.driver, jdbc.url, jdbc.user, jdbc.password
                and db properties in your ~/.m2/settings.xml
            -->
            <dependencies>
                <dependency>
                    <groupId>oracle</groupId>
                    <artifactId>ojdbc14</artifactId>
                    <version>10.2.0.4</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>postgresql</id>
            <!--
                Configure jdbc.driver, jdbc.url, jdbc.user, jdbc.password
                and db properties in your ~/.m2/settings.xml
            -->
            <dependencies>
                <dependency>
                    <groupId>org.postgresql</groupId>
                    <artifactId>postgresql</artifactId>
                    <version>9.3-1102-jdbc4</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>sqlite</id>
            <!--
                Configure jdbc.driver, jdbc.url, jdbc.user, jdbc.password
                and db properties in your ~/.m2/settings.xml
            -->
            <dependencies>
                <dependency>
                    <groupId>org.xerial</groupId>
                    <artifactId>sqlite-jdbc</artifactId>
                    <version>3.8.7</version>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>tds</id>
            <!--
                Configure jdbc.driver, jdbc.url, jdbc.user, jdbc.password
                and db properties in your ~/.m2/settings.xml
            -->
            <dependencies>
                <dependency>
                    <groupId>net.sourceforge.jtds</groupId>
                    <artifactId>jtds</artifactId>
                    <version>1.3.1</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
		<profile>
			<id>db2</id>
			<!--
                Configure jdbc.driver, jdbc.url (with :progressiveStreaming=2;), jdbc.user, jdbc.password
                and db properties in your ~/.m2/settings.xml
                E.g.
                <properties>
                    <jdbc.driver>com.ibm.db2.jcc.DB2Driver</jdbc.driver>
                    <jdbc.url>jdbc:db2://192.168.99.100:50000/db2:progressiveStreaming=2;</jdbc.url>
                    <jdbc.user>db2inst1</jdbc.user>
                    <jdbc.password>db2inst1-pwd</jdbc.password>
                    <db>db2</db>
                </properties>
			-->
			<repositories>
				<repository>
					<id>alfresco</id>
					<name>Alfresco Public </name>
					<url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
				</repository>
			</repositories>
			<dependencies>
				<!-- https://mvnrepository.com/artifact/com.ibm.db2.jcc/db2jcc4 -->
				<dependency>
					<groupId>com.ibm.db2.jcc</groupId>
					<artifactId>db2jcc4</artifactId>
					<version>10.1</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>
    </profiles>

    <build>
        <testResources>
            <testResource>
                <directory>${project.basedir}/src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.javalite</groupId>
                <artifactId>activejdbc-instrumentation</artifactId>
                <version>${project.version}</version>
                <executions>
                    <execution>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>instrument</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.basedir}/target/test-classes</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.javassist</groupId>
                        <artifactId>javassist</artifactId>
                        <version>3.18.1-GA</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.3.1</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>1.8</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>

        <dependency>
            <groupId>org.javalite</groupId>
            <artifactId>javalite-common</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jaxen</groupId>
                    <artifactId>jaxen</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.javalite</groupId>
            <artifactId>app-config</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>oscache</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.jms</groupId>
                    <artifactId>jms</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.3.171</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.5.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.5.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>c3p0</groupId>
            <artifactId>c3p0</artifactId>
            <version>0.9.1.2</version>
            <scope>test</scope>
        </dependency>
        <!--TODO: two versions of EHCache??-->
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache-core</artifactId>
            <version>2.4.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ehcache</groupId>
            <artifactId>ehcache</artifactId>
            <version>3.0.0.m4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>2.7.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.25-incubating</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
</project>
