<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>org.linkki-framework</groupId>
    <artifactId>linkki</artifactId>
    <version>0.9.20180118</version>
    <packaging>pom</packaging>

    <name>linkki</name>
    <description>A data binding framework for web based user interfaces with Vaadin.</description>
    <url>https://github.com/linkki-framework/linkki</url>
    <licenses>
      <license>
        <name>The Apache License, Version 2.0</name>
        <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      </license>
    </licenses>
    <developers>
      <developer>
        <name>Faktor Zehn</name>
        <email>info@faktorzehn.de</email>
        <organization>Faktor Zehn AG</organization>
        <organizationUrl>https://www.faktorzehn.de</organizationUrl>
      </developer>
    </developers>

    <modules>
        <module>linkki-codeanalysis</module>
        <module>test</module>
        <module>utils</module>
        <module>core</module>
        <module>application-framework</module>
        <module>doc</module>
        <module>samples</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <m2e.jdt.annotationpath>.settings/annotations</m2e.jdt.annotationpath>
        <git.user>${user.name}</git.user>
        <vaadin.version>7.7.11</vaadin.version>
        <joda-time.version>2.4</joda-time.version>
        <junit.version>4.12</junit.version>
        <mockito.version>1.10.8</mockito.version>
        <commons-lang3.version>3.4</commons-lang3.version>
        <jboss-javaee-6.version>3.0.3.Final</jboss-javaee-6.version>
        <deltaspike.version>1.4.1</deltaspike.version>
        <doc.user>${user.name}</doc.user>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <!-- at the moment we do not check missing javadoc like 
                        missing @param or @return -->
                    <additionalparam>-Xdoclint:accessibility
                        -Xdoclint:html -Xdoclint:reference
                        -Xdoclint:syntax</additionalparam>
                    <tags>
                        <tag>
                            <name>generated</name>
                            <placement>a</placement>
                            <head>Faktor-IPS Generated</head>
                        </tag>
                        <tag>
                            <name>customizedAnnotations</name>
                            <placement>X</placement>
                        </tag>
                        <tag>
                            <name>restrainedmodifiable</name>
                            <placement>a</placement>
                            <head>Customized Faktor-IPS generated Code</head>
                        </tag>
                    </tags>
                </configuration>
            </plugin>
            <!-- CheckStyle: in order to get the config in the correct version 
                you need to add an extension to the org.faktorips.build.config module -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.linkki-framework</groupId>
                        <artifactId>linkki-codeanalysis</artifactId>
                        <version>0.9.20180118</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <configLocation>config/checkstyle/checkstyle.xml</configLocation>
                    <suppressionsLocation>config/checkstyle/suppressions.xml</suppressionsLocation>
                    <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
                    <propertyExpansion>config_loc=checkstyle</propertyExpansion>
                    <linkXRef>false</linkXRef>
                </configuration>
                <executions>
                    <execution>
                        <id>checkstyle</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- FindBugs: in order to get the config in the correct version 
                you need to add an extension to the org.faktorips.build.config module -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.linkki-framework</groupId>
                        <artifactId>linkki-codeanalysis</artifactId>
                        <version>0.9.20180118</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                    <threshold>Low</threshold>
                    <excludeFilterFile>config/findbugs/exclusion-filter.xml</excludeFilterFile>
                </configuration>
                <executions>
                    <execution>
                        <id>checkstyle</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>findbugs</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Jacoco code coverage -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <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>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <!-- pass properties needed in release:perform -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <arguments>-Ddoc.user=${doc.user}</arguments>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.16</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.7.4.201502262128</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.18.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.3</version>
                </plugin>
                <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-release-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.5</version>
                </plugin>

                <!--This plugin's configuration is used to store Eclipse 
                    m2e settings only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.jacoco</groupId>
                                        <artifactId>jacoco-maven-plugin</artifactId>
                                        <versionRange>${jacoco.version}</versionRange>
                                        <goals>
                                            <goal>prepare-agent</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-junit</artifactId>
                <version>2.0.0.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>annotations</artifactId>
                <version>3.0.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>${joda-time.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>3.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-server</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-client-compiled</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-client</artifactId>
                <version>${vaadin.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-push</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-themes</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-cdi</artifactId>
                <version>1.0.3</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.spec</groupId>
                <artifactId>jboss-javaee-6.0</artifactId>
                <version>${jboss-javaee-6.version}</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.apache.deltaspike.core</groupId>
                <artifactId>deltaspike-core-api</artifactId>
                <version>${deltaspike.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.deltaspike.core</groupId>
                <artifactId>deltaspike-core-impl</artifactId>
                <version>${deltaspike.version}</version>
                <scope>runtime</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-junit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-6.0</artifactId>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <scm>
        <connection>scm:git:https://github.com/linkki-framework/linkki.git</connection>
        <developerConnection>scm:git:ssh://${git.user}@projekte.faktorzehn.de/projekte/linkki.git</developerConnection>
        <url>https://github.com/linkki-framework/linkki/tree/master</url>
        <tag>linkki-0.9.20180118</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>releases</id>
            <name>linkki Releases</name>
            <url>https://nexus.faktorzehn.de/content/repositories/linkki/</url>
        </repository>
        <snapshotRepository>
            <id>snapshots</id>
            <name>linkki Snapshots</name>
            <url>https://nexus.faktorzehn.de/content/repositories/linkki-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <profiles>
	<profile>
            <id>MavenCentralRelease</id>
            <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>
            <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>
</project>
