<!--

    ######################################################################################
    # LGPL License                                                                       #
    #                                                                                    #
    # This file is part of the LightJason AgentSpeak(L++)                                #
    # Copyright (c) 2015-19, LightJason (info@lightjason.org)                            #
    # This program 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.                                    #
    #                                                                                    #
    # This program 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 this program. 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.lightjason</groupId>
    <artifactId>agentspeak</artifactId>
    <version>0.0.1</version>
 

    <!-- project meta information -->
    <name>LightJason AgentSpeak(L++)</name>
    <description>AgentSpeak(L++) is a logical programming language of a multi-agent BDI system with a fuzzy-based logical calculus, lambda expressions and parallelization</description>
    <url>https://github.com/LightJason/AgentSpeak</url>

    <organization>
        <name>LightJason</name>
        <url>http://lightjason.org</url>
    </organization>

    <licenses>
        <license>
            <name>GNU Lesser General Public License 3</name>
            <url>http://www.gnu.org/licenses/lgpl-3.0.en.html</url>
        </license>
    </licenses>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/LightJason/AgentSpeak/issues</url>
    </issueManagement>

    <scm>
        <url>https://github.com/LightJason/AgentSpeak</url>
        <connection>scm:git:git://github.com:LightJason/AgentSpeak.git</connection>
        <developerConnection>scm:git:git@github.com:LightJason/AgentSpeak.git</developerConnection>
        <tag>v0.0.1</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <developers>
        <developer>
            <id>flashpixx</id>
            <name>Philipp Kraus</name>
            <email>philipp@lightjason.org</email>
            <timezone>Europe/Berlin</timezone>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Malte Aschermann</name>
            <email>malte@lightjason.org</email>
            <timezone>Europe/Berlin</timezone>
            <roles>
                <role>testing</role>
            </roles>
        </contributor>

        <contributor>
            <name>Sophie Denissen</name>
            <email>sophie@lightjason.org</email>
            <timezone>Europe/Berlin</timezone>
            <roles>
                <role>testing</role>
            </roles>
        </contributor>
    </contributors>


    <!-- project build configuration -->
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.compiler.source>1.9</maven.compiler.source>
        <maven.compiler.target>${maven.compiler.source}</maven.compiler.target>

        <!-- will be set outside (build parameter) -->
        <build.number />
        <build.commit />
        <coverall.token />
    </properties>


    <dependencies>

        <!-- main structures -->
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
            <version>4.7.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.6</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.16.1</version>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>24.0-jre</version>
        </dependency>

        <dependency>
            <groupId>com.codepoetics</groupId>
            <artifactId>protonpack</artifactId>
            <version>1.15</version>
        </dependency>

        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <version>0.9.11</version>
        </dependency>

        <dependency>
            <groupId>uk.com.robust-it</groupId>
            <artifactId>cloning</artifactId>
            <version>1.9.9</version>
        </dependency>

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.9.9</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.9.4</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-xml</artifactId>
            <version>2.9.4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.5</version>
        </dependency>


        <!-- math structures -->
        <dependency>
            <groupId>net.sourceforge.parallelcolt</groupId>
            <artifactId>parallelcolt</artifactId>
            <version>0.10.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>3.6.1</version>
        </dependency>

        <dependency>
            <groupId>net.sf.jung</groupId>
            <artifactId>jung-graph-impl</artifactId>
            <version>2.1.1</version>
         </dependency>

        <dependency>
            <groupId>net.sf.jung</groupId>
            <artifactId>jung-algorithms</artifactId>
            <version>2.1.1</version>
        </dependency>


        <!-- checking -->
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>findbugs</artifactId>
            <version>3.0.1</version>
        </dependency>


        <!-- test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>[4.12,)</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.github.javaparser</groupId>
            <artifactId>javaparser-core</artifactId>
            <version>[3.5.11,)</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.tngtech.java</groupId>
            <artifactId>junit-dataprovider</artifactId>
            <version>[1.11.0,)</version>
            <scope>test</scope>
        </dependency>

    </dependencies>


    <!-- reporting plugins -->
    <reporting>

        <plugins>

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

            <plugin>
                <groupId>de.flashpixx</groupId>
                <artifactId>rrd-antlr4</artifactId>
                <version>0.0.1</version>
                <configuration>
                    <excludes>
                        <exclude>Type.g4</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>3.1.0-RC7</version>
                <configuration>
                    <includeFilterFile>src/analysis/findbugs/includefiles.xml</includeFilterFile>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <maxRank>20</maxRank>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jdepend-maven-plugin</artifactId>
                <version>2.0</version>
            </plugin>

            <!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.8</version>
                <configuration>
                    <excludes>
                        <exclude>**/CASTVisitorAgent.java</exclude>
                        <exclude>**/CASTVisitorPlanBundle.java</exclude>
                        <exclude>**/generated/*.java</exclude>
                    </excludes>
                    <linkXRef>false</linkXRef>
                </configuration>
            </plugin>
            -->

            <!-- @bug runs out of memory
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <version>1.4.5</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            -->

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.0</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report</report>
                            <report>report-integration</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

        </plugins>

    </reporting>


    <!-- profile for signing arifacts on release -->
    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <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>
        </profile>
    </profiles>


    <!-- main build -->
    <build>
        <!-- default goal is set to package and checking dependency updates -->
        <defaultGoal>install versions:display-dependency-updates versions:display-plugin-updates versions:display-property-updates</defaultGoal>

        <!-- include resource directory with replacing configuration variables -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <!-- using build plugins -->
        <pluginManagement>

            <plugins>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.6</version>
                    <configuration>
                        <tempWebappDirectory>${basedir}/target/site</tempWebappDirectory>
                    </configuration>
                </plugin>

            </plugins>

        </pluginManagement>

        <plugins>

            <!-- enforce version -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M1</version>
                <executions>
                    <execution>
                        <id>defaults</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.1,)</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>[${maven.compiler.source},)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Maven release -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>com.amashchenko.maven.plugin</groupId>
                <artifactId>gitflow-maven-plugin</artifactId>
                <version>1.9.0</version>
                <configuration>
                    <installProject>false</installProject>
                    <verbose>false</verbose>

                    <gitFlowConfig>
                        <productionBranch>master</productionBranch>
                        <developmentBranch>developing</developmentBranch>
                        <featureBranchPrefix>feature/</featureBranchPrefix>
                        <releaseBranchPrefix>release/</releaseBranchPrefix>
                        <hotfixBranchPrefix>hotfix/</hotfixBranchPrefix>
                        <supportBranchPrefix>support/</supportBranchPrefix>
                        <versionTagPrefix>pre</versionTagPrefix>
                        <origin>origin</origin>
                    </gitFlowConfig>
                </configuration>
            </plugin>

            <!-- License -->
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <header>src/analysis/license/licensetemplate.txt</header>
                    <useDefaultExcludes>true</useDefaultExcludes>
                    <headerDefinitions>
                        <headerDefinition>src/analysis/license/style.xml</headerDefinition>
                    </headerDefinitions>
                    <excludes>
                        <exclude>.dockerignore</exclude>
                        <exclude>**/*.tokens</exclude>
                        <exclude>**/*.txt</exclude>
                        <exclude>**/*.yml</exclude>
                        <exclude>**/*.md</exclude>
                        <exclude>**/*.htm</exclude>
                        <exclude>**/*.doxyfile</exclude>
                        <exclude>**/*.xslt</exclude>
                        <exclude>target/**</exclude>
                    </excludes>
                    <mapping>
                        <g4>javadoc_style</g4>
                        <asl>javadoc_style</asl>
                    </mapping>
                </configuration>
            </plugin>

            <!-- AntLR grammar build -->
            <plugin>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-maven-plugin</artifactId>
                <version>4.7.1</version>
                <configuration>
                    <visitor>true</visitor>
                    <listener>false</listener>
                    <treatWarningsAsErrors>true</treatWarningsAsErrors>
                </configuration>
                <executions>
                    <execution>
                        <id>antlr</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>antlr4</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Doxygen -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <failOnError>false</failOnError>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.6.0</version>
                <executions>
                    <execution>
                        <id>doxygen</id>
                        <phase>site</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>doxygen</executable>
                            <arguments>
                                <argument>src/site/configuration.doxyfile</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- compiler settings -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <compilerArgument>-Xlint:all</compilerArgument>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                    <failOnWarning>true</failOnWarning>
                </configuration>
            </plugin>

            <!-- Clean -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>.</directory>
                            <includes>
                                <include>src/main/antlr4/**/*.tokens</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>remove-old-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>remove-project-artifact</goal>
                        </goals>
                        <configuration>
                            <removeAll>true</removeAll>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- checkstyle is perform at compile phase -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>[7.8.2,)</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>checkstyle</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <configLocation>src/analysis/checkstyle/style.xml</configLocation>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                </configuration>
            </plugin>

            <!-- code-coverage report plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20.1</version>
                <configuration>
                    <argLine>${argLine} -Xms1g -Xmx1g</argLine>
                    <forkCount>1</forkCount>
                    <runOrder>random</runOrder>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.0</version>
                <executions>
                    <execution>
                        <id>initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>4.3.0</version>
                <configuration>
                    <repoToken>${coverall.token}</repoToken>
                    <sourceDirectories>
                        <directory>target/generated-sources/antlr4</directory>
                    </sourceDirectories>
                </configuration>
            </plugin>

        </plugins>
    </build>
</project>
