<?xml version="1.0" encoding="UTF-8"?>
<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.teleal.cling</groupId>
        <artifactId>cling</artifactId>
        <version>1.0-alpha4</version>
    </parent>

    <name>Cling Core</name>
    <artifactId>cling-core</artifactId>
    <packaging>jar</packaging>

    <build>
        <plugins>

            <!-- Unit tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/AllTests.tng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>

            <!-- Prepare Javadoc for distribution packaging -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.6.1</version>
                <executions>
                    <execution>
                        <id>package-javadoc</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>javadoc</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!-- WTF! http://jira.codehaus.org/browse/MJAVADOC-268 --> 
                    <detectOfflineLinks>false</detectOfflineLinks>
                </configuration>
            </plugin>

            <!-- Generate documentation for distribution packaging -->
            <plugin>
                <groupId>org.teleal.lemma</groupId>
                <artifactId>lemma-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>prepare-package-manual</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>manual</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>


    <reporting>
        <!-- We don't want the usual Maven claptrap -->
        <excludeDefaults>true</excludeDefaults>

        <plugins>

            <!-- Build the manual for 'site' lifecycle -->
            <plugin>
                <groupId>org.teleal.lemma</groupId>
                <artifactId>lemma-maven-plugin</artifactId>
                <version>${lemma.version}</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>site-manual</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <!-- We want Javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.6.1</version>
                <reportSets>
                    <reportSet>
                        <id>default</id>
                        <configuration>
                            <detectOfflineLinks>false</detectOfflineLinks>
                        </configuration>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <!-- We want cross-referenced source code -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.1</version>
            </plugin>

        </plugins>

    </reporting>

</project>