<!--

    This file is part of TRIO.

    TRIO is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    TRIO is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with TRIO.  If not, see <http://www.gnu.org/licenses/>.

-->
<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>
  
    <groupId>net.fchauvel.trio</groupId>
    <artifactId>root</artifactId>
    <packaging>pom</packaging>
    <version>0.4</version>
    <url>http://fchauvel.github.com/trio</url>
  
    <name>TRIO</name>
  
    <description>
        TRIO is a domain specific language (DSL) used to describe the topology
        of software deployment and to gain insight regarding their robustness.
    </description>
  
    <modules>
        <module>core</module>
        <module>performance</module>
        <module>generator</module>
        <module>graph</module>
    </modules>
    

   
    <build>
        <plugins>
            <!-- Check for design issue -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <linkXref>false</linkXref>
                    <sourceEncoding>utf-8</sourceEncoding>
                    <rulesets>
                        <ruleset>src/main/resources/pmd-ruleset.xml</ruleset>
                    </rulesets>
                    <excludeRoots>
                        <excludeRoot>target/generated-sources/antlr4</excludeRoot>
                    </excludeRoots>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                            <goal>cpd-check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>            
            
            <!-- Check for bugs by static analysis -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <excludeFilterFile>src/main/resources/findbugs-exclude.xml</excludeFilterFile>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <xmlOutput>true</xmlOutput>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <!-- Unit Testing -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.16</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit47</artifactId>
                        <version>2.16</version>
                    </dependency>
                </dependencies>
            </plugin>
            
            <!-- Code Coverage -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.5.201505241946</version>
                <configuration>
                    <fileSets>
                        <fileSet>
                            <directory>${project.build.directory}/</directory>
                            <includes>
                                <include>*.exec</include>
                            </includes>
                        </fileSet>
                    </fileSets>
                    <destFile>${project.build.directory}/jacoco.exec</destFile>
                </configuration>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <!--<execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <rule implementation="org.jacoco.maven.RuleConfiguration">
                                    <element>BUNDLE</element>
                                    <limits>
                                        <limit implementation="org.jacoco.report.check.Limit">
                                            <counter>COMPLEXITY</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.60</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>-->
                </executions>
            </plugin>
            
            <!-- Integration tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.18</version>
                <executions>
                    <execution>
                        <id>default-integration-test</id>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <!-- Licence headers -->
            <plugin>
                <inherited>false</inherited>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.11</version>
                <configuration>
                    <strictCheck>true</strictCheck>
                    <header>com/mycila/maven/plugin/license/templates/LGPL-3.txt</header>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>true</aggregate>
                    <properties>
                        <projectname>TRIO</projectname>
                        <organization>SINTEF ICT</organization>
                        <owner>Franck Chauvel</owner>
                        <year>${project.inceptionYear}</year>
                        <email>franck.chauvel@sintef.no</email>
                    </properties>
                    <mapping>
                        <scala>JAVADOC_STYLE</scala>
                        <conf>SCRIPT_STYLE</conf>
                    </mapping>
                </configuration>     
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>  
            </plugin>

            <!-- Attach sources -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <includeDependencySources>true</includeDependencySources>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
                     
            <!--  Publishing to OSSRH -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.6</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>                    
            
            <!-- Signing Files -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
        </plugins>
    </build>
    
    <reporting>
        
        <plugins>            
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.17</version>
            </plugin>
            
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.1.201405082137</version>
            </plugin>
           
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <rulesets>
                        <ruleset>src/main/resources/pmd-ruleset.xml</ruleset>
                    </rulesets> 
                </configuration>
            </plugin>
           
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <excludeFilterFile>src/main/resources/findbugs-exclude.xml</excludeFilterFile>
                </configuration>
            </plugin>
           
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <includeDependencySources>true</includeDependencySources>
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <linkJavadoc>true</linkJavadoc>
                    <javadocDir>apidocs</javadocDir>
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.6</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <!-- <report>dependencies</report> Takes ages because on kotlin-stdlib -->
                            <report>index</report>
                            <report>dependency-info</report>
                            <report>distribution-management</report>
                            <report>project-team</report>
                            <!-- <report>mailing-list</report> -->
                            <report>cim</report>
                            <report>issue-tracking</report>
                            <report>license</report>
                            <report>modules</report>
                            <report>scm</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            
        </plugins>
        
    </reporting>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <github.global.server>github</github.global.server>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope> 
        </dependency>
        
        <dependency>
            <groupId>org.jmock</groupId>
            <artifactId>jmock</artifactId>
            <version>2.6.0</version>
            <scope>test</scope>
        </dependency>
      
        <dependency>
            <groupId>org.jmock</groupId>
            <artifactId>jmock-junit4</artifactId>
            <version>2.6.0</version>
            <scope>test</scope>
        </dependency>
            
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        
    </dependencies>
            
    <licenses>
        <license>
            <name>LGPL</name>
            <url>https://www.gnu.org/licenses/lgpl-3.0-standalone.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    
    <developers>
        <developer>
            <name>Franck Chauvel</name>
            <organization>SINTEF ICT</organization>
            <email>franck.chauvel@sintef.no</email>
        </developer>
        <developer>
            <name>Hui Song</name>
            <organization>SINTEF ICT</organization>
            <email>hui.song@sintef.no</email>
        </developer>
        <developer>
            <name>Franck Fleurey</name>
            <organization>SINTEF ICT</organization>
            <email>franck.fleurey@sintef.no</email>
        </developer>
    </developers>
     
    <distributionManagement>
        
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        
    </distributionManagement>
     
    <issueManagement>
        <url>https://github.com/fchauvel/trio/issues</url>
    </issueManagement>
            
    <ciManagement>
        <url>https://codeship.com/projects/97492</url>
        <system>codeship</system>
    </ciManagement>

    <scm>
        <connection>scm:git:git@github.com:fchauvel/trio.git</connection>
        <url>scm:git:git@github.com:fchauvel/trio.git</url>
        <developerConnection>scm:git:git@github.com:fchauvel/trio.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

</project>
