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

    <!-- Inherit from OW2 base maven POM. Required to be able to deploy on 
        Nexus repository. -->
    <parent>
        <groupId>org.ow2</groupId>
        <artifactId>ow2</artifactId>
        <version>1.3</version>
    </parent>

    <groupId>org.ow2.mind</groupId>
    <artifactId>mind-parent</artifactId>
    <version>5</version>

    <packaging>pom</packaging>
    <name>MIND parent POM</name>

    <description>
        Parent POM for MIND modules built with maven.
    </description>

    <url>http://mind.ow2.org/mind-parent-${project.version}/</url>

    <issueManagement>
        <system>jira</system>
        <url>http://jira.ow2.org/browse/MIND</url>
    </issueManagement>

    <inceptionYear>2009</inceptionYear>

    <organization>
        <name>OW2</name>
        <url>http://ow2.org/</url>
    </organization>

    <developers>
        <developer>
            <id>leclercq</id>
            <name>Matthieu Leclercq</name>
            <email>matthieu.leclercq@st.com</email>
            <organization>STMicroelectronics</organization>
        </developer>
    </developers>

    <repositories>
        <repository>
            <id>OW2-release</id>
            <name>OW2 Maven Repository</name>
            <url>http://maven.ow2.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>OW2-snapshot</id>
            <name>OW2 Maven SNAPSHOT Repository</name>
            <url>http://maven.ow2.org/maven2-snapshot</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <properties>
        <!-- The login name on the OW2 Forge (default is local user name, 
            may be overridden on the command line or in settings.xml file). -->
        <ow2.username>${user.name}</ow2.username>
        <ow2.hostname>forge.objectweb.org</ow2.hostname>
        <ow2.site.deploy.dir>/var/lib/gforge/chroot/home/groups/mind/htdocs</ow2.site.deploy.dir>
    </properties>

    <scm>
        <connection>scm:svn:svn://svn.forge.objectweb.org/svnroot/mind/maven/tags/mind-parent-5</connection>
        <developerConnection>scm:svn:svn+ssh://svn.forge.objectweb.org/svnroot/mind/maven/tags/mind-parent-5</developerConnection>
        <url>http://fisheye.ow2.org/browse/mind/maven/tags/mind-parent-5</url>
    </scm>

    <mailingLists>
        <mailingList>
            <name>MIND Mailing list</name>
            <post>mind@ow2.org</post>
        </mailingList>
        <mailingList>
            <name>MIND SVN-commit Mailing list</name>
            <post>mind-commit@ow2.org</post>
        </mailingList>
    </mailingLists>



    <distributionManagement>
        <site>
            <id>OW2</id>
            <name>MIND OW2's site</name>
            <url>scp://${ow2.hostname}${ow2.site.deploy.dir}/mind-parent-${project.version}</url>
        </site>
    </distributionManagement>

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

    <build>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>2.2</version>
            </extension>
        </extensions>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <!-- The SCM username. -->
                        <username>${ow2.username}</username>

                        <remoteTagging>false</remoteTagging>
                    </configuration>
                </plugin>

                <!-- Use Java 1.5 -->
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                    </configuration>
                </plugin>

                <!-- Always attach source jar -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.1.2</version>

                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>

                </plugin>

                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.0</version>
                </plugin>

                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.2-beta-5</version>
                </plugin>

                <!-- Test coverage -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>2.3</version>
                </plugin>

                <!-- quality metrics -->
                <plugin>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>2.4</version>
                    <configuration>
                        <targetJdk>1.5</targetJdk>
                    </configuration>
                </plugin>

                <!-- Javadoc -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.6.1</version>
                </plugin>

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

                <!-- source metrics -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>javancss-maven-plugin</artifactId>
                    <version>2.0-beta-2</version>
                </plugin>

                <plugin>
                    <groupId>com.agilejava.docbkx</groupId>
                    <artifactId>docbkx-maven-plugin</artifactId>
                    <version>2.0.9</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

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

    <profiles>

        <profile>
            <id>release-profile</id>

            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>

            <reporting>
                <plugins>
                    <!-- test coverage -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>cobertura-maven-plugin</artifactId>
                        <version>2.3</version>
                    </plugin>

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

                    <!-- source metrics -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>javancss-maven-plugin</artifactId>
                        <version>2.0-beta-2</version>
                    </plugin>

                    <!-- PMD reports -->
                    <plugin>
                        <artifactId>maven-pmd-plugin</artifactId>
                        <reportSets>
                            <reportSet>
                                <id>default</id>
                                <reports>
                                    <report>pmd</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                        <configuration>
                            <targetJdk>1.5</targetJdk>
                        </configuration>
                    </plugin>

                    <!-- source cross reference reports -->
                    <plugin>
                        <artifactId>maven-jxr-plugin</artifactId>
                        <version>2.3</version>
                        <configuration>
                            <aggregate>true</aggregate>
                            <windowtitle>${project.name} Source code</windowtitle>
                            <doctitle>
                                ${project.name} ${project.version}
                                Source code
                            </doctitle>
                        </configuration>
                    </plugin>
                </plugins>
            </reporting>
        </profile>

        <!-- Profile used for build performed for continuous-integration -->
        <profile>
            <id>CI-profile</id>

            <build>
                <plugins>
                    <!-- Generate cobertura xml report -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>cobertura-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>test-coverage</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>cobertura</goal>
                                </goals>
                                <configuration>
                                    <format>xml</format>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- quality metrics -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-pmd-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>pmd-report</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>pmd</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- source metrics -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>javancss-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>javancss-report</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>test-deploy</id>

            <properties>
                <repository.test.url>file:///tmp/mind/repo</repository.test.url>
                <site.test.url>file:///tmp/mind/site</site.test.url>
            </properties>

            <distributionManagement>
                <repository>
                    <id>test</id>
                    <url>${repository.test.url}</url>
                </repository>
                <snapshotRepository>
                    <id>test</id>
                    <url>${repository.test.url}</url>
                </snapshotRepository>
                <site>
                    <id>OW2</id>
                    <name>MIND OW2's site</name>
                    <url>${site.test.url}/mind-parent-${project.version}</url>
                </site>
            </distributionManagement>
        </profile>
    </profiles>
</project>
