<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>

    <name>AgileDev</name>
    <groupId>org.uniknow</groupId>
    <artifactId>agiledev</artifactId>
    <version>0.1.13</version>
    <packaging>pom</packaging>
    <description>Tooling for Agile development</description>
    <url>https://github.com/UniKnow/AgileDev</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <organization>
        <name>UniKnow</name>
        <url>http://www.uniknow.org</url>
    </organization>

    <developers>
        <developer>
            <id>mase</id>
            <name>Mark Schenk</name>
            <organization>UniKnow</organization>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
            <timezone>Europe/Amsterdam</timezone>
        </developer>
    </developers>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

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

        <github.global.server>github</github.global.server>

        <timestamp>${maven.build.timestamp}</timestamp>
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>

        <!-- Version information dependencies -->
        <aspectj.version>1.8.7</aspectj.version>
        <cglib.version>3.2.0</cglib.version>
        <cucumber.version>1.1.5</cucumber.version>
        <doxia.version>1.5</doxia.version>
        <findbugs.jsr305.version>3.0.0</findbugs.jsr305.version>
        <groovy.version>2.1.6</groovy.version>
        <hibernate.version>[4.2.0.Final,4.3.2.Final]</hibernate.version>
        <hibernate-validator.version>5.1.3.Final</hibernate-validator.version>
        <javax.inject.version>1</javax.inject.version>
        <javax.el.version>2.2.4</javax.el.version>
        <jboss-logging.version>3.1.3.GA</jboss-logging.version>
        <jta.version>1.1</jta.version>
        <junit.version>4.12</junit.version>
        <mylyn.version>1.7.4.v20130429</mylyn.version>
        <narayana.version>5.2.0.Final</narayana.version>
        <oval.version>1.84</oval.version>
        <spring.framework.version>[3.0.7.RELEASE,3.2.13.RELEASE]</spring.framework.version>
        <tomcat.version>7.0.63</tomcat.version>
    </properties>

    <distributionManagement>
        <site>
            <id>github-pages-site</id>
            <url>site/${project.version}</url>
        </site>

        <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>


    <scm>
        <connection>
            scm:git:git://github.com/UniKnow/AgileDev.git
        </connection>
        <developerConnection>
            scm:git:https://github.com/UniKnow/AgileDev.git
        </developerConnection>
        <url>https://github.com/UniKnow/AgileDev</url>
      <tag>agiledev-0.1.13</tag>
  </scm>

    <modules>
        <module>buildConfiguration</module>
        <module>asciidoctor-exportdoclet</module>
        <module>asciidoctor-site-diagram-activator</module>
        <module>maven-site-indexer</module>
        <module>common</module>
        <module>parent</module>
        <module>junitBdd</module>
        <module>dbc4java</module>
        <module>cucumber-reporting</module>
        <module>cucumber-reporting-example</module>
        <module>embedded-mysql</module>
        <module>maven-embedded-mysql</module>
        <module>spring-cqrs</module>
        <module>spring-event-sourcing</module>
        <module>spring-tcc-transactions</module>
        <module>narayana-tomcat-listener</module>
        <module>tutorials/archimate</module>
        <module>tutorials/cqrs-eventsourcing</module>
        <module>tutorials/dbc</module>
        <module>tutorials/ddd</module>
        <module>tutorials/rest</module>
        <!--<module>tutorials/typescript</module>-->
    </modules>

    <dependencyManagement>
        <dependencies>
            <!--
            Dependencies for shared/root classes framework
            -->
            <dependency>
                <groupId>org.uniknow.agiledev</groupId>
                <artifactId>common</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- Dependencies javax -->
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>${javax.inject.version}</version>
            </dependency>

            <!-- Dependencies for enabling Design by Contract -->
            <dependency>
                <groupId>org.aspectj</groupId>
                <artifactId>aspectjrt</artifactId>
                <version>${aspectj.version}</version>
            </dependency>
            <dependency>
                <groupId>org.aspectj</groupId>
                <artifactId>aspectjweaver</artifactId>
                <version>${aspectj.version}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib</artifactId>
                <version>${cglib.version}</version>
            </dependency>


            <!-- Dependencies spring -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${spring.framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
                <version>${spring.framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.framework.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
                <version>${spring.framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aspects</artifactId>
                <version>${spring.framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${spring.framework.version}</version>
            </dependency>


            <!-- Dependency hibernate -->
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>${hibernate-validator.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.el</groupId>
                <artifactId>javax.el-api</artifactId>
                <version>${javax.el.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.web</groupId>
                <artifactId>javax.el</artifactId>
                <version>${javax.el.version}</version>
            </dependency>

            <!-- Dependency for findbug statically code analyzing -->
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>${findbugs.jsr305.version}</version>
            </dependency>

            <!-- Dependencies testing -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <!--
                Maven Java compiler plugin
                -->
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                    </configuration>
                </plugin>

                <!--
                   Plugin for managing the license of project
                -->
                <plugin>
                    <groupId>com.mycila.maven-license-plugin</groupId>
                    <artifactId>maven-license-plugin</artifactId>
                    <version>1.9.0</version>
                    <configuration>
                        <strictCheck>true</strictCheck>
                        <header>license/header.txt</header>
                        <properties>
                            <organizationName>uniknow</organizationName>
                            <inceptionYear>2014</inceptionYear>
                        </properties>

                        <excludes>
                            <exclude>**/*.iml</exclude>
                            <exclude>target/**</exclude>
                            <exclude>.idea/**</exclude>
                            <exclude>node/**</exclude>
                            <exclude>node_modules/**</exclude>
                        </excludes>

                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>format</goal>
                            </goals>
                            <phase>process-sources</phase>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>org.uniknow.agiledev</groupId>
                            <artifactId>buildConfiguration</artifactId>
                            <version>0.1.13</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!--
                    Plugin for formatting java source files following specified
                    code conventions. The formatter is based on the eclipse
                    formatted and can use the exported xml formatting definitions
                -->
                <plugin>
                    <groupId>com.googlecode.maven-java-formatter-plugin
                    </groupId>
                    <artifactId>maven-java-formatter-plugin</artifactId>
                    <version>0.4</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>format</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <lineEnding>LF</lineEnding>
                        <configFile>formatter/uniknow.xml</configFile>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.uniknow.agiledev</groupId>
                            <artifactId>buildConfiguration</artifactId>
                            <version>0.1.13</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!-- Plugin to generate javadocs -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.9.1</version>
                    <configuration>
                        <!--
                        A Doclet that allows the use of Markdown and
                        PlantUML in JavaDoc comments.
                        -->
                        <doclet>ch.raffael.doclets.pegdown.PegdownDoclet
                        </doclet>
                        <docletArtifact>
                            <groupId>ch.raffael.pegdown-doclet</groupId>
                            <artifactId>pegdown-doclet</artifactId>
                            <version>1.1</version>
                        </docletArtifact>
                        <useStandardDocletOptions>
                            true
                        </useStandardDocletOptions>
                    </configuration>
                </plugin>

                <!-- Instrument classes for code coverage reporting -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <aggregate>false</aggregate>
                        <attach>false</attach>
                        <check>
                        </check>
                        <instrumentation>
                            <ignores>
                                <ignore>org.agileDev.*</ignore>
                            </ignores>
                            <excludes>
                                <exlude>org/agileDev/**/*.class</exlude>
                            </excludes>
                        </instrumentation>
                        <formats>
                            <format>html</format>
                            <format>xml</format>
                        </formats>
                    </configuration>
                    <executions>
                        <!--<execution>-->
                        <!--<id>clean</id>-->
                        <!--<phase>pre-site</phase>-->
                        <!--<goals>-->
                        <!--<goal>clean</goal>-->
                        <!--</goals>-->
                        <!--</execution>-->
                        <execution>
                            <id>instrument-code-coverage</id>
                            <phase>site</phase>
                            <goals>
                                <!--<goal>instrument</goal>-->
                                <goal>cobertura</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.3.1</version>
                <configuration>
                    <skip>false</skip>
                    <fail>true</fail>
                    <rules>
                        <requireUpperBoundDeps />
                        <!-- ensure uniquely versioned dependencies during the build -->
                        <dependencyConvergence />
                    </rules>
                </configuration>
                <executions>
                    <execution>
                        <id>enforce-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.3</version>
                <dependencies>
                    <!--
                    allows confluence syntax for site documentation. To use it
                    place files below src/site/confluence/[filename].confluence
                    -->
                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-module-confluence</artifactId>
                        <version>${doxia.version}</version>
                    </dependency>

                    <!--
                    allows markdown syntax for site documentation. To use it
                    place files below src/site/markdown/[filename].md
                    -->
                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-module-markdown</artifactId>
                        <version>${doxia.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <!--
                    Disable deployment of the maven site; this will be done by
                    the github site plugin
                    -->
                    <skipDeploy>true</skipDeploy>

                </configuration>
            </plugin>

            <!--
            Note: ensure the proper GitHub authentication settings are included
            in your settings.xml
            -->
            <!--<plugin>-->
            <!--<groupId>com.github.github</groupId>-->
            <!--<artifactId>site-maven-plugin</artifactId>-->
            <!--<version>0.11</version>-->
            <!--<configuration>-->
            <!--<message>-->
            <!--Creating site for ${project.artifactId},-->
            <!--${project.version}-->
            <!--</message>-->
            <!--<path>${project.distributionManagement.site.url}</path>-->
            <!--<merge>true</merge>-->
            <!--</configuration>-->
            <!--<executions>-->
            <!--<execution>-->
            <!--<id>github-site</id>-->
            <!--<goals>-->
            <!--<goal>site</goal>-->
            <!--</goals>-->
            <!--<phase>site</phase>-->
            <!--</execution>-->
            <!--</executions>-->
            <!--</plugin>-->

            <!-- ================================================== -->
            <!-- GitFlow plugin								        -->
            <!-- support for GitFlow style releases via maven		-->
            <!-- ================================================== -->
            <plugin>
                <groupId>external.atlassian.jgitflow</groupId>
                <artifactId>jgitflow-maven-plugin</artifactId>
                <version>1.0-m4.3</version>
                <configuration>
                    <!-- Append feature name to version of feature branch -->
                    <enableFeatureVersions>true</enableFeatureVersions>

                    <!-- Enable SSH agent to push to origin using SSH keys -->
                    <enableSshAgent>true</enableSshAgent>

                    <!-- Keep your maven submodules at the same version as the parent POM  -->
                    <autoVersionSubmodules>true</autoVersionSubmodules>

                    <!--
                        Pushing in-development features to origin allows all developers to
                        see what each other are working on
                    -->
                    <pushFeatures>false</pushFeatures>

                    <!-- Allow un-tracked files during finishing feature -->
                    <allowUntracked>true</allowUntracked>

                    <!--
                        This allows the CI server (e.g. Jenkins) to automatically push new
                        releases to origin; you can then either manually deploy them or, if you
                        are doing Continuous Deployments, auto-deploy them to prod
                    -->
                    <pushReleases>true</pushReleases>

                    <!--
                        Hot Fixes should be pushed to origin as well so that any dev can
                        pick them up
                    -->
                    <pushHotfixes>true</pushHotfixes>

                    <!--
                        Prevents deployments from dev workstations so that they can be done
                        by a CI server
                    -->
                    <noDeploy>false</noDeploy>

                    <!--
                        If set to true, the plugin sets the property "performRelease" to true, which activates the profile "release-profile"
                     -->
                    <useReleaseProfile>true</useReleaseProfile>

                    <!--
                        GitFlow init context
                    -->
                    <flowInitContext>
                        <masterBranchName>master</masterBranchName>
                        <developBranchName>develop</developBranchName>
                        <featureBranchPrefix>feature-</featureBranchPrefix>
                        <releaseBranchPrefix>release-</releaseBranchPrefix>
                        <hotfixBranchPrefix>hotfix-</hotfixBranchPrefix>
                        <versionTagPrefix>${project.artifactId}-
                        </versionTagPrefix>
                    </flowInitContext>
                </configuration>
            </plugin>

            <!-- Plugins for releasing artifacts to maven central repository -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.5</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>true</useReleaseProfile>
                    <releaseProfiles>release-signed-artifacts</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-signed-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>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>generate-PDF</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <version>2.7</version>
                        <configuration>
                            <outputDirectory>${basedir}/target/pdf/images
                            </outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/site/resources/ddd/images
                                    </directory>
                                </resource>
                                <resource>
                                    <directory>src/site/resources/eip/images
                                    </directory>
                                </resource>
                            </resources>
                        </configuration>
                        <executions>
                            <execution>
                                <!-- Copy images of DDD and EIP to common images folder -->
                                <id>copy-images</id>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>
                                        ${basedir}/target/pdf/images
                                    </outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>
                                                src/site/resources/ddd/images
                                            </directory>
                                        </resource>
                                        <resource>
                                            <directory>
                                                src/site/resources/eip/images
                                            </directory>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-pdf-plugin</artifactId>
                        <version>1.3</version>
                        <executions>
                            <execution>
                                <id>pdf</id>
                                <goals>
                                    <goal>pdf</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>
                                        ${project.reporting.outputDirectory}
                                    </outputDirectory>
                                    <includeReports>false</includeReports>
                                </configuration>
                            </execution>
                        </executions>
                        <dependencies>
                            <!--
                            allows confluence syntax for site documentation. To use it
                            place files below src/site/confluence/[filename].confluence
                            -->
                            <dependency>
                                <groupId>org.apache.maven.doxia</groupId>
                                <artifactId>doxia-module-confluence</artifactId>
                                <version>${doxia.version}</version>
                            </dependency>

                            <!--
                            allows markdown syntax for site documentation. To use it
                            place files below src/site/markdown/[filename].md
                            -->
                            <dependency>
                                <groupId>org.apache.maven.doxia</groupId>
                                <artifactId>doxia-module-markdown</artifactId>
                                <version>${doxia.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>