<?xml version="1.0" encoding="UTF-8"?>
<!--

       Copyright 2010-2017 the original author or authors.

       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 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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.mybatis</groupId>
        <artifactId>mybatis-parent</artifactId>
        <version>29</version>
        <relativePath/>
    </parent>

    <groupId>org.singledog</groupId>
    <artifactId>mybatis-spring</artifactId>
    <version>1.3.3</version>
    <packaging>jar</packaging>

    <name>mybatis-spring</name>
    <description>An easy-to-use Spring bridge for MyBatis sql mapping framework.</description>
    <url>http://www.mybatis.org/spring/</url>

    <contributors>

        <contributor>
            <name>Alex Rykov</name>
            <email>Alex.Rykov@gmail.com</email>
        </contributor>

        <contributor>
            <name>Andrius Juozapaitis</name>
            <email>andriusj@gmail.com</email>
        </contributor>

        <contributor>
            <name>Giovanni Cuccu</name>
            <email>giovanni.cuccu@gmail.com</email>
        </contributor>

        <contributor>
            <name>Kay Huber</name>
            <email>kay.huber@gmail.com</email>
        </contributor>

        <contributor>
            <name>Lishu Luo</name>
            <email>lishu.luo@gmail.com</email>
        </contributor>

        <contributor>
            <name>Michael Lanyon</name>
            <email>lanyonm@gmail.com</email>
        </contributor>

        <contributor>
            <name>Raj Nagappan</name>
            <email>raj@velocitylabs.com</email>
        </contributor>

        <contributor>
            <name>Tomáš Piňos</name>
            <email>tomas.pinos@gmail.com</email>
        </contributor>
    </contributors>

    <scm>
        <url>https://github.com/wupeng1988/mybatis-spring</url>
        <connection>scm:git:ssh://git@github.com:wupeng1988/mybatis-spring.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:wupeng1988/mybatis-spring.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
    <distributionManagement>
        <snapshotRepository>
            <id>maven</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>maven</id>
            <url> https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
    </distributionManagement>

    <properties>
        <clirr.comparisonVersion>1.2.2</clirr.comparisonVersion>
        <findbugs.onlyAnalyze>
            org.mybatis.spring.*,org.mybatis.spring.mapper.*,org.mybatis.spring.support.*,org.mybatis.spring.transaction.*
        </findbugs.onlyAnalyze>
        <gcu.product>Spring</gcu.product>
        <osgi.import>org.springframework.batch.*;resolution:=optional,*</osgi.import>
        <osgi.dynamicImport>*</osgi.dynamicImport>
        <spring.version>4.2.6.RELEASE</spring.version>
    </properties>

    <dependencies>
        <!-- Compile dependencies -->
        <dependency>
            <groupId>org.singledog</groupId>
            <artifactId>mybatis-jpa</artifactId>
            <version>3.4.7</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${spring.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.batch</groupId>
            <artifactId>spring-batch-infrastructure</artifactId>
            <version>3.0.7.RELEASE</version>
            <scope>provided</scope>
        </dependency>

        <!-- Test dependencies -->

        <dependency>
            <groupId>com.atomikos</groupId>
            <artifactId>transactions-jdbc</artifactId>
            <version>4.0.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <version>10.12.1.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>ognl</groupId>
            <artifactId>ognl</artifactId>
            <version>3.1.4</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>3.2.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.byteman</groupId>
            <artifactId>byteman-bmunit</artifactId>
            <version>3.0.5</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>2.3.3</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
            <scope>test</scope>
        </dependency>

        <!-- Using version 1.0.1, versions higher require only jdk7 -->
        <dependency>
            <groupId>com.mockrunner</groupId>
            <artifactId>mockrunner-core</artifactId>
            <version>1.0.1</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.kirkk</groupId>
                    <artifactId>jaranalyzer</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jdom</groupId>
                    <artifactId>jdom</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>nekohtml</groupId>
                    <artifactId>nekohtml</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.mockrunner</groupId>
            <artifactId>mockrunner-ejb</artifactId>
            <version>1.0.1</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.mockejb</groupId>
                    <artifactId>mockejb</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.mockrunner</groupId>
            <artifactId>mockrunner-jdbc</artifactId>
            <version>1.0.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.transaction</groupId>
            <artifactId>transaction-api</artifactId>
            <version>1.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <property>
                            <name>derby.stream.error.file</name>
                            <value>${project.build.directory}/derby.log</value>
                        </property>
                        <property>
                            <name>com.atomikos.icatch.log_base_dir</name>
                            <value>${project.build.directory}</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <locales>en,es,zh_CN,ja,ko</locales>
                </configuration>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>${project.basedir}</directory>
                <targetPath>META-INF</targetPath>
                <includes>
                    <include>LICENSE</include>
                    <include>NOTICE</include>
                </includes>
            </resource>
            <resource>
                <directory>${project.build.sourceDirectory}</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>${project.build.testSourceDirectory}</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </testResource>
        </testResources>
    </build>

    <!-- TODO: Why is this necessary, the dependency is already present at this scope? -->
    <!-- this is just a turn-around to Mac compilers -->
    <profiles>
        <profile>
            <id>mac-jvm-classloader-issue</id>
            <activation>
                <os>
                    <family>mac</family>
                </os>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>oro</groupId>
                    <artifactId>oro</artifactId>
                    <version>2.0.8</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
