<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright 2009-2010 The iBaGuice Team

    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.
-->

<!--
    version: $Id: pom.xml 2107 2010-06-07 16:30:56Z simone.tripodi $
-->
<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>com.googlecode.ibaguice</groupId>
    <artifactId>ibaguice-parent</artifactId>
    <packaging>pom</packaging>
    <version>1.0</version>
    <name>iBaGuice</name>
    <description>An easy-to-use Google Guice bridge for MyBatis sql mapping framework</description>
    <url>http://www.99soft.org/projects/ibaguice/${project.version}</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
        </license>
    </licenses>

    <mailingLists>
        <mailingList>
            <name>iBaGuice public group</name>
            <post>ibaguice at googlegroups dot com</post>
            <archive>http://groups.google.com/group/ibaguice</archive>
            <subscribe>http://groups.google.com/group/ibaguice/subscribe</subscribe>
        </mailingList>
    </mailingLists>

    <scm>
        <developerConnection>scm:svn:https://ibaguice.googlecode.com/svn/tags/1.0</developerConnection>
        <connection>scm:svn:http://ibaguice.googlecode.com/svn/tags/1.0</connection>
        <url>http://code.google.com/p/ibaguice/source/browse/#svn/tags/1.0</url>
    </scm>

    <issueManagement>
        <system>Google-Code Issue Management</system>
        <url>http://code.google.com/p/ibaguice/issues/</url>
    </issueManagement>

    <distributionManagement>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>

        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>

        <site>
            <id>99soft.org</id>
            <url>ftp://ftp.99soft.org/htdocs/projects/ibaguice/${project.version}</url>
        </site>
    </distributionManagement>

    <developers>
        <developer>
            <id>simone.tripodi</id>
            <name>Simone Tripodi</name>
            <email>simone dot tripodi at gmail dot com</email>
            <organization>Sourcesense S.r.l.</organization>
            <organizationUrl>http://www.sourcesense.com/</organizationUrl>
            <roles>
                <role>Owner</role>
                <role>Committer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>

        <developer>
            <id>marco.speranza</id>
            <name>Marco Speranza</name>
            <email>marco dot speranza79 at gmail dot com</email>
            <organization>TRS S.p.A.</organization>
            <organizationUrl>http://www.trs.it/</organizationUrl>
            <roles>
                <role>Committer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Dependency manager: general dependencies -->
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>2.0</version>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>com.google.inject.extensions</groupId>
                <artifactId>guice-multibindings</artifactId>
                <version>2.0</version>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.1.1</version>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>org.mybatis</groupId>
                <artifactId>mybatis</artifactId>
                <version>3.0.1</version>
                <scope>compile</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>5.8</version>
            <classifier>jdk15</classifier>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.7</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.1</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.1</version>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jdepend-maven-plugin</artifactId>
                <version>2.0-beta-2</version>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>1.1.1</version>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                    <xmlOutputDirectory>target/findbugs-reports</xmlOutputDirectory>
                    <threshold>High</threshold>
                    <effort>Max</effort>
                    <visitors>FindDeadLocalStores</visitors>
                    <omitVisitors>FindDeadLocalStores</omitVisitors>
                    <onlyAnalyze>com.googlecode.ibaguice.*</onlyAnalyze>
                    <debug>true</debug>
                    <relaxed>true</relaxed>
                    <xmlOutputDirectory>target/findbugs-reports</xmlOutputDirectory>
                    <findbugsXmlOutput>target/findbugs-reports</findbugsXmlOutput>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.5</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <issueLinkTemplate>%URL%/detail?id=%ISSUE%</issueLinkTemplate>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>changes-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.4.1</version>
            </plugin>

            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.5</version>
            </plugin>

            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.3</version>
            </plugin>

            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.3</version>
            </plugin>

            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0-beta-1</version>
                <executions>
                    <execution>
                        <id>enforce-java</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>[1.5,)</version>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>[2.2.0,)</version>
                                </requireMavenVersion>
                                <requirePluginVersions>
                                    <message>Best Practice is to always define plugin versions!</message>
                                    <banLatest>true</banLatest>
                                    <banRelease>true</banRelease>
                                    <banSnapshots>true</banSnapshots>
                                    <phases>clean,deploy,site</phases>
                                </requirePluginVersions>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

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

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.7</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.0.4</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.4.3</version>
                <configuration>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>2.0-beta-7</version>
                <configuration>
                    <outputEncoding>UTF-8</outputEncoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pdf-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <id>pdf</id>
                        <phase>site</phase>
                        <goals>
                            <goal>pdf</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <includeReports>false</includeReports>
                    <indentSize>1</indentSize>
                </configuration>
            </plugin>
        </plugins>

        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ftp</artifactId>
                <version>1.0-beta-6</version>
            </extension>
        </extensions>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>

            <resource>
                <directory>..</directory>
                <targetPath>META-INF</targetPath>
                <includes>
                    <include>LICENSE</include>
                    <include>NOTICE</include>
                    <include>doap_ibaguice.rdf</include>
                </includes>
            </resource>
        </resources>
    </build>

    <profiles>
        <profile>
            <!-- Use this profile to create a new release and deploy artifacts
                 mvn -Prelease release:prepare
                       -Dusername=<svn.username>
                       -Dpassword=<svn.pass>
                       -Darguments=-Dgpg.keyname=<gpg.keyname>\ -Dgpg.passphrase=<gpg.passphrase>
             -->
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.0</version>
                        <configuration>
                            <preparationGoals />
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <!-- Use this profile to create a new branch
                 mvn -Pbranch release:branch
                       -DbranchName=<branchName>
                       -Dusername=<svn.username>
                       -Dpassword=<svn.pass>
             -->
            <id>branch</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.0</version>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <updateWorkingCopyVersions>false</updateWorkingCopyVersions>
                            <updateBranchVersions>true</updateBranchVersions>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <modules>
        <module>core</module>

        <!-- datasources -->
        <module>c3p0</module>
        <module>dbcp</module>

        <!-- caches -->
        <module>oscache</module>
        <module>memcached</module>
        <module>ehcache</module>
        <module>jbosscache</module>
        <module>hazelcast</module>

        <!-- sample apps -->
        <module>samples</module>
    </modules>

</project>
