<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>net.sf.ehcache</groupId>
        <artifactId>ehcache-parent</artifactId>
        <version>1.5.0</version>
    </parent>
    <name>Ehcache Core</name>
    <artifactId>ehcache</artifactId>
    <packaging>jar</packaging>
    <version>1.6.0</version>

    <dependencies>

        <!-- Provided scope -->
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <scope>provided</scope>
            <version>3.2.6.ga</version>
        </dependency>

        <!--  Test scope -->
        <dependency>
            <groupId>net.sf.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>httpunit</groupId>
            <artifactId>httpunit</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>checkstyle</groupId>
            <artifactId>checkstyle</artifactId>
        </dependency>
        <dependency>
            <groupId>checkstyle</groupId>
            <artifactId>checkstyle-optional</artifactId>
        </dependency>
        <dependency>
            <groupId>com.cenqua.clover</groupId>
            <artifactId>clover</artifactId>
        </dependency>
    </dependencies>

    <build>
        <testResources>
            <testResource>
                <directory>${basedir}/src/main/config/jcache</directory>
            </testResource>
            <testResource>
                <directory>${basedir}/src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
                <executions>
                    <execution>
                        <id>compile_for_javadoc</id>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.3</version>

                <configuration>
                    <author>true</author>
                    <bottom>true</bottom>
                    <!--<destDir>${project.build.directory}/site/javadoc</destDir>-->
                    <header><![CDATA[<a href="/" target="_top">ehcache</a>]]></header>
                    <minmemory>128m</minmemory>
                    <maxmemory>512</maxmemory>
                    <overview>${basedir}/src/main/java/net/sf/ehcache/overview.html</overview>
                    <use>true</use>
                    <version>true</version>
                    <windowtitle>${project.name} ${project.version} API</windowtitle>
                </configuration>

                <executions>
                    <execution>
                        <id>generate-javadoc</id>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>javadoc</goal>
                        </goals>
                        <configuration>
                            <doclet>ydoc.doclets.YStandard</doclet>
                            <docletPath>
                                ${ydoc.home}/lib/ydoc.jar${path.separator}${ydoc.home}/lib/class2svg.jar${path.separator}${ydoc.home}/resources
                            </docletPath>
                            <additionalparam>-license ${ydoc.license} -filter ydoc.filters.ExcludeFilter -filterpath
                                ${ydoc.home}/lib/ydoc.jar -umlautogen
                            </additionalparam>
                            <author>true</author>
                            <bottom>true</bottom>
                            <!--<destDir>${project.build.directory}/site/javadoc</destDir>-->
                            <header><![CDATA[<a href="/" target="_top">ehcache</a>]]></header>
                            <minmemory>128m</minmemory>
                            <maxmemory>512</maxmemory>
                            <overview>${basedir}/src/main/java/net/sf/ehcache/overview.html</overview>
                            <use>true</use>
                            <version>true</version>
                            <windowtitle>${project.name} ${project.version} API</windowtitle>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>rmic</id>
                        <phase>compile</phase>
                        <configuration>
                            <tasks>
                                <rmic base="${project.build.outputDirectory}"
                                      includes="**/RMICachePeer.class"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>

                    <execution>
                        <id>singlepageguide</id>
                        <phase>pre-site</phase>
                        <configuration>
                            <tasks>
                                <ant target="singlepageguide"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>

                    <execution>
                        <id>unhide_embedded_html</id>
                        <phase>site</phase>
                        <configuration>
                            <tasks>
                                <ant target="unhide_html"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>

                </executions>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.0.3</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>
                <inherited>true</inherited>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <excludes>
                        <exclude>**/*$*</exclude>
                        <exclude>**/web/**/*</exclude>
                        <exclude>**/Abstract*Test.java</exclude>
                        <exclude>**/constructs/web/**</exclude>
                    </excludes>
                    <forkMode>pertest</forkMode>
                    <debugForkedProcess>true</debugForkedProcess>
                    <childDelegation>false</childDelegation>
                    <disableXmlReport>true</disableXmlReport>
                    <printSummary>true</printSummary>
                    <reportFormat>plain</reportFormat>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    <systemProperties>
                        <property>
                            <name>java.awt.headless</name>
                            <value>true</value>
                        </property>
                        <property>
                            <name>
                                net.sf.ehcache.speedAdjustmentFactor
                            </name>
                            <value>
                                ${net.sf.ehcache.speedAdjustmentFactor}
                            </value>
                        </property>
                    </systemProperties>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-tests</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <includes>
                                <include>**/web/**/*Test.java</include>
                            </includes>
                            <excludes>
                                <exclude>**/*$*</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>
                            ${pom.artifactId}
                        </Bundle-SymbolicName>
                        <Export-Package>
                            *;version=${pom.version}
                        </Export-Package>
                        <Import-Package>
                            net.sf.hibernate.cache;resolution:=optional,*;-split-package:=merge-first
                        </Import-Package>
                    </instructions>
                    <classifier>osgi</classifier>
                </configuration>
                <executions>
                    <execution>
                        <id>bundle</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>bundle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <configLocation>${basedir}/checkstyle/checkstyle.xml</configLocation>
                    <suppressionsLocation>${basedir}/checkstyle/suppressions.xml</suppressionsLocation>
                    <headerLocation>${basedir}/checkstyle/ClassHeader.txt</headerLocation>
                    <enableRSS>false</enableRSS>
                    <linkXRef>true</linkXRef>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <failOnViolation>true</failOnViolation>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <enableRulesSummary>true</enableRulesSummary>
                </configuration>
            </plugin>

            <!-- Use this to specify a different template. It also needs a local copy of maven-base.css -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <templateFile>${basedir}/src/site/default-site-ehcache.vm</templateFile>
                </configuration>
            </plugin>


            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <filters>
                        <filter>src/assemble/filter.properties</filter>
                    </filters>
                    <descriptors>
                        <descriptor>src/assemble/distribution.xml</descriptor>
                    </descriptors>
                    <tarLongFileMode>gnu</tarLongFileMode>
                </configuration>
                <!--<executions>-->
                <!--<execution>-->
                <!--<id>assemble</id>-->
                <!--<phase>verify</phase>-->
                <!--<goals>-->
                <!--<goal>assembly</goal>-->
                <!--</goals>-->
                <!--</execution>-->
                <!--</executions>-->
            </plugin>


        </plugins>
    </build>


    <!-- Reports -->
    <reporting>
        <plugins>

            <!--Reports -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>dependencies</report>
                            <report>project-team</report>
                            <report>mailing-list</report>
                            <report>issue-tracking</report>
                            <report>license</report>
                            <report>scm</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>


            <!--PMD and CPD -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <configuration>
                    <rulesets>
                        <ruleset>/rulesets/basic.xml</ruleset>
                    </rulesets>
                    <format>xml</format>
                    <targetJdk>1.5</targetJdk>
                    <linkXRef>true</linkXRef>
                    <sourceEncoding>utf-8</sourceEncoding>
                    <minimumTokens>100</minimumTokens>
                    <outputDirectory>${project.reporting.outputDirectory}</outputDirectory>
                </configuration>
            </plugin>

            <!--Manual Changelist -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>changes-maven-plugin</artifactId>
                <configuration>
                    <link_template>
                        %URL%/index.php?func=detail&amp;group_id=93232&amp;atid=603559&amp;aid=%ISSUE%
                    </link_template>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>changes-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <!--ToDos -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>2.0-beta-1</version>
                <configuration>
                    <tags>todo, TODO, @todo</tags>
                </configuration>
            </plugin>

            <!--Java Cross Reference (JXR) -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jxr-maven-plugin</artifactId>
                <configuration>
                    <outputDirectory>${project.build.directory}/site</outputDirectory>
                    <docTitle>ehcache</docTitle>
                </configuration>
            </plugin>


        </plugins>
    </reporting>

    <distributionManagement>
        <repository>
            <id>sourceforge-releases</id>
            <name>Sourceforge Release Repository</name>
            <url>http://oss.sonatype.org/content/repositories/sourceforge-releases</url>
        </repository>
        <snapshotRepository>
            <id>sourceforge-snapshots</id>
            <name>Sourceforge Snapshot Repository</name>
            <url>http://oss.sonatype.org/content/repositories/sourceforge-snapshots</url>
        </snapshotRepository>


        <!--
        The server id here defined must also appear in ~/.m2/settings.xml with username
        Note: site URL repeated here to ensure correct deployment path -->
        <site>
            <id>sourceforge.net</id>
            <name>SF EHCache Site</name>
            <url>scp://web.sourceforge.net:/home/groups/e/eh/ehcache/htdocs</url>
        </site>
    </distributionManagement>

    <properties>
        <net.sf.ehcache.speedAdjustmentFactor>1</net.sf.ehcache.speedAdjustmentFactor>
    </properties>
</project>
