<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.jboss.cache</groupId>
        <artifactId>jbosscache-support</artifactId>
        <version>1.0</version>
    </parent>

    <groupId>org.jboss.cache</groupId>
    <artifactId>jbosscache-common-parent</artifactId>
    <packaging>pom</packaging>

    <name>JBoss Cache Common Parent</name>
    <description>The parent POM for all JBoss Cache modules.</description>
    <url>http://labs.jboss.org/jbosscache</url>

    <organization>
        <name>JBoss, a division of Red Hat</name>
        <url>http://labs.jboss.org</url>
    </organization>

    <licenses>
        <license>
            <name>GNU Lesser General Public License</name>
            <url>http://www.gnu.org/copyleft/lesser.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:svn:http://anonsvn.jboss.org/repos/jbosscache/core/trunk/</connection>
        <developerConnection>scm:svn:https://svn.jboss.org/repos/jbosscache/core/trunk</developerConnection>
        <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/</url>
    </scm>

    <issueManagement>
        <system>jira</system>
        <url>http://jira.jboss.com/jira/browse/JBCACHE</url>
    </issueManagement>

    <ciManagement>
        <system>cruisecontrol</system>
        <url>http://cruisecontrol.jboss.com/cc/</url>
        <notifiers>
            <notifier>
                <type>mail</type>
                <address>jbosscache-dev@lists.jboss.org</address>
            </notifier>
        </notifiers>
    </ciManagement>

    <mailingLists>
        <mailingList>
            <name>JBoss Cache Announcements</name>
            <post>jbosscache-announce@lists.jboss.org</post>
            <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-announce</subscribe>
            <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-announce</unsubscribe>
            <archive>http://lists.jboss.org/pipermail/jbosscache-dev/</archive>
        </mailingList>
        <mailingList>
            <name>JBoss Cache Commit Notificatons</name>
            <post>jbosscache-commits@lists.jboss.org</post>
            <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-commits</subscribe>
            <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-commits</unsubscribe>
            <archive>http://lists.jboss.org/pipermail/jbosscache-commits/</archive>
        </mailingList>
        <mailingList>
            <name>JBoss Cache Developers</name>
            <post>jbosscache-dev@lists.jboss.org</post>
            <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-dev</subscribe>
            <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-dev</unsubscribe>
            <archive>http://lists.jboss.org/pipermail/jbosscache-dev/</archive>
        </mailingList>
        <mailingList>
            <name>JBoss Cache Issue Notifications</name>
            <post>jbosscache-issues@lists.jboss.org</post>
            <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-issues</subscribe>
            <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-issues</unsubscribe>
            <archive>http://lists.jboss.org/pipermail/jbosscache-issues/</archive>
        </mailingList>
    </mailingLists>

    <build>
        <plugins>
            <!-- require at least JDK 1.5 to run the build -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0-alpha-3</version>
                <executions>
                    <execution>
                        <id>enforce-java</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>[1.5,)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- by default, compile to JDK 1.5 compatibility (individual modules and/or user can override) -->
            <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>
                </configuration>
            </plugin>

            <!-- add specification/implementation details to the manifests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                  <systemProperties>
                    <property>
                      <name>bind.address</name>
                      <value>127.0.0.1</value>
                    </property>
                  </systemProperties>
                  <!-- Warning, this does not work right on 2.4-SNAPSHOT, (see SUREFIRE-349) -->
                  <redirectTestOutputToFile>true</redirectTestOutputToFile>
                </configuration>
            </plugin>

            <!-- javadocs : we want these run in the 'package' lifecycle phase-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>javadoc</goal>
                        </goals>
                        <configuration>
                            <aggregate>${jbosscache.reports.aggregate}</aggregate>
                            <links>
                                <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
                                <link>http://java.sun.com/javaee/5/docs/api/</link>
                            </links>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <finalName>${artifactId}</finalName>
    </build>

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

            <!-- javadocs -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <aggregate>${jbosscache.reports.aggregate}</aggregate>
                    <links>
                        <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
                        <link>http://java.sun.com/javaee/5/docs/api/</link>
                    </links>
                </configuration>
            </plugin>

            <!-- JXR - links from javadocs and junit reports to an html representation of the code -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <configuration>
                    <aggregate>${jbosscache.reports.aggregate}</aggregate>
                </configuration>
            </plugin>

            <!-- PMD code analysis reports -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <configuration>
                    <aggregate>${jbosscache.reports.aggregate}</aggregate>
                    <linkXref>true</linkXref>
                    <minimumTokens>100</minimumTokens>
                    <targetJdk>1.4</targetJdk>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <configuration>
                    <aggregate>${jbosscache.reports.aggregate}</aggregate>
                    <tags>
                        <tag>@FIXME</tag>
                        <tag>@fixme</tag>
                        <tag>FIXME</tag>
                        <tag>fixme</tag>
                        <tag>@TODO</tag>
                        <tag>@todo</tag>
                        <tag>TODO</tag>
                        <tag>todo</tag>
                    </tags>
                </configuration>
            </plugin>
            <plugin>
                <!-- Note: aggregate-able, may cause problems if we aggregate jxr and not this because of the xref links -->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>javancss-maven-plugin</artifactId>
            </plugin>

            <!-- Findbugs report -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <configuration>
                    <onlyAnalyze>org.jboss.cache.*</onlyAnalyze>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <properties>
        <!-- for now, at least, lets aggregate them -->
        <jbosscache.reports.aggregate>true</jbosscache.reports.aggregate>
    </properties>

    <repositories>
        <repository>
            <id>repository.jboss.org</id>
            <url>http://repository.jboss.org/maven2</url>
        </repository>

        <repository>
            <id>snapshots.jboss.org</id>
            <url>http://snapshots.jboss.org/maven2</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>Main Maven Repo</id>
            <url>http://repo1.maven.org/maven2/</url>
        </pluginRepository>

<!--  Avoid enabling this, it brings in unstable plugins 
        <pluginRepository>
            <id>apache.snapshots</id>
            <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
        </pluginRepository>
-->
        <pluginRepository>
            <id>repository.jboss.org</id>
            <url>http://repository.jboss.org/maven2</url>
        </pluginRepository>

        <pluginRepository>
            <id>snapshots.jboss.org</id>
            <url>http://snapshots.jboss.org/maven2</url>
        </pluginRepository>

    </pluginRepositories>

    <dependencies>
        <!-- test dependencies to run the test suites -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>5.1</version>
            <scope>test</scope>
            <classifier>jdk15</classifier>
        </dependency>

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

</project>
