
<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>
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>
    <groupId>org.softsmithy</groupId>
    <artifactId>softsmithy-parent</artifactId>
    <packaging>pom</packaging>
    <version>3.2</version>
    <name>SoftSmithy - Parent POM</name>
    <url>http://www.softsmithy.org</url>
    <description>SoftSmithy is a platform for open source Java developers. The core is an extended Java utility library. This SoftSmithy Parent POM should be the parent (either directly or indirectly) of every SoftSmithy project unless there is a good reason to do otherwise (in which case the reason should be documented).</description>
    <inceptionYear>2002</inceptionYear>
    <organization>
        <name>SoftSmithy</name>
        <url>http://www.softsmithy.org</url>
    </organization>

    <scm>
        <connection>scm:git:https://github.com/SoftSmithy/softsmithy-parent.git</connection>
        <developerConnection>scm:git:git@github.com:SoftSmithy/softsmithy-parent.git</developerConnection>
        <url>https://github.com/SoftSmithy/softsmithy-parent</url>
        <tag>HEAD</tag>
    </scm>

    <issueManagement>
        <system>SourceForge.net</system>
        <url>http://sourceforge.net/tracker/?group_id=64833</url>
    </issueManagement>

    <developers>
        <developer>
            <id>puce77</id>
            <name>Florian Brunner</name>
            <email>fbrunnerreg@gmx.ch</email>
            <url>http://puces-blog.blogspot.com/</url>
            <timezone>1</timezone>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0</name>
            <distribution>repo</distribution>
            <!--<url>http://java.sun.com/spl.html</url>-->
            <url>LICENSE.txt</url>
        </license>
    </licenses>
    <properties>

        <!-- Dev Environment Defaults -->
        <maven.version>3.3.9</maven.version>
        <java.min.version>1.8</java.min.version>
        <java.compiler.compilerArgument>-Xlint:all</java.compiler.compilerArgument>
        <java.compiler.showWarnings>true</java.compiler.showWarnings>
        <java.compiler.showDeprecation>true</java.compiler.showDeprecation>
        <main-resources.filtering>true</main-resources.filtering>
        <main-resources-bin.filtering>false</main-resources-bin.filtering>
        <annotations-resources.filtering>true</annotations-resources.filtering>
        <test-resources.filtering>true</test-resources.filtering>
        <test-resources-bin.filtering>false</test-resources-bin.filtering>
        <test-annotations-resources.filtering>true</test-annotations-resources.filtering>
        <release.plugin.arguments>-Psonatype-oss-release -Dusername=${username} -Dhttps.protocols=TLSv1.2</release.plugin.arguments>
        
        <!-- Plugin Versions Defaults -->
        <plugin.properties.version>1.0.0</plugin.properties.version>
        <plugin.enforcer.version>1.4.1</plugin.enforcer.version>
        <plugin.bundle.version>3.3.0</plugin.bundle.version>
        <plugin.antrun.version>1.8</plugin.antrun.version>
        <plugin.assembly.version>3.0.0</plugin.assembly.version>
        <plugin.clean.version>3.0.0</plugin.clean.version>
        <plugin.compiler.version>3.6.0</plugin.compiler.version>
        <plugin.dependency.version>3.0.0</plugin.dependency.version>
        <plugin.deploy.version>2.8.2</plugin.deploy.version>
        <plugin.gpg.version>1.6</plugin.gpg.version>
        <plugin.install.version>2.5.2</plugin.install.version>
        <plugin.jar.version>3.0.2</plugin.jar.version>
        <plugin.toolchains.version>1.1</plugin.toolchains.version>
        <plugin.javadoc.version>2.10.4</plugin.javadoc.version>
        <plugin.project-info-reports.version>2.7</plugin.project-info-reports.version>
        <!-- use version 2.6 since version 2.7 suffers from the following issue: http://jira.codehaus.org/browse/MSHARED-325 -->
        <plugin.resources.version>3.0.2</plugin.resources.version>
        <plugin.site.version>3.6</plugin.site.version>
        <plugin.source.version>3.0.1</plugin.source.version>
        <plugin.surefire.version>2.19.1</plugin.surefire.version>
        <plugin.release.version>2.5.3</plugin.release.version>
        <plugin.jgitflow.version>1.0-m5.1</plugin.jgitflow.version>
        <plugin.github-site.version>0.12</plugin.github-site.version>
        
        <!-- Wagon Versions Defaults -->
        <wagon.ssh.version>2.10</wagon.ssh.version>
        <!--There is an issue with v2.0.4 : https://github.com/trajano/wagon-git/issues/18-->
        <wagon.git.version>2.0.3</wagon.git.version>      
    </properties>

    <!-- Not inherited!?? -->
    <prerequisites>
        <maven>${maven.version}</maven>
    </prerequisites>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>${main-resources.filtering}</filtering>
            </resource>
            <resource>
                <directory>src/main/resources-bin</directory>
                <filtering>${main-resources-bin.filtering}</filtering>
            </resource>
            <resource>
                <directory>${project.build.directory}/generated-sources/annotations</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
                <filtering>${annotations-resources.filtering}</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>${test-resources.filtering}</filtering>
            </testResource>
            <testResource>
                <directory>src/test/resources-bin</directory>
                <filtering>${test-resources-bin.filtering}</filtering>
            </testResource>
            <testResource>
                <directory>${project.build.directory}/generated-test-sources/test-annotations</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
                <filtering>${test-annotations-resources.filtering}</filtering>
            </testResource>
        </testResources>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>${wagon.ssh.version}</version>
            </extension>
        </extensions>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>properties-maven-plugin</artifactId>
                    <version>${plugin.properties.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${plugin.enforcer.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${plugin.bundle.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${plugin.antrun.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${plugin.assembly.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${plugin.clean.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${plugin.compiler.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${plugin.dependency.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${plugin.deploy.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${plugin.gpg.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${plugin.install.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${plugin.jar.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${plugin.javadoc.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${plugin.project-info-reports.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${plugin.resources.version}</version>
                    <!--                    <executions>
                    http://stackoverflow.com/questions/11144704/configure-encoding-for-different-filetypes-in-maven
                    <executions>
                        <execution>
                             Turn off default resource copying 
                            <id>default-resources</id>
                            <phase />
                        </execution>
                        <execution>
                             Filter resources in properties files. 
                            <id>filter-properties-files</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <encoding>ISO-8859-1</encoding>
                                <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>src/main/resources</directory>
                                        <filtering>true</filtering>
                                        <includes>
                                            <include>**/*.properties</include>
                                        </includes>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                        <execution>
                             Do not do property substitution in files that are not properties files, such as binary files. 
                            <id>copy-other-resources</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>src/main/resources</directory>
                                        <filtering>false</filtering>
                                        <excludes>
                                            <exclude>**/*.properties</exclude>
                                        </excludes>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>-->
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${plugin.site.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>net.trajano.wagon</groupId>
                            <artifactId>wagon-git</artifactId>
                            <version>${wagon.git.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${plugin.source.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${plugin.surefire.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-toolchains-plugin</artifactId>
                    <version>${plugin.toolchains.version}</version>
                </plugin>
                <plugin>
                    <!-- See issue https://issues.sonatype.org/browse/OSSRH-3975 -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${plugin.release.version}</version>
                    <configuration>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <useReleaseProfile>false</useReleaseProfile>
                        <arguments>${release.plugin.arguments}</arguments>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>external.atlassian.jgitflow</groupId>
                    <artifactId>jgitflow-maven-plugin</artifactId>
                    <version>${plugin.jgitflow.version}</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <pushReleases>true</pushReleases>
                        <flowInitContext>
                            <versionTagPrefix>release-</versionTagPrefix>
                        </flowInitContext>                    
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.github</groupId>
                    <artifactId>site-maven-plugin</artifactId>
                    <version>${plugin.github-site.version}</version>
                    <configuration>
                        <message>Creating site for ${project.version}</message>
                        <!-- this does the trick to place every module in the correct subfolder -->
                        <path>${project.distributionManagement.site.url}</path>
                        <merge>true</merge>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>${maven.version}</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>${java.min.version}</version>
                                </requireJavaVersion>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.min.version}</source>
                    <target>${java.min.version}</target>
                    <compilerArgument>${java.compiler.compilerArgument}</compilerArgument>
                    <showWarnings>${java.compiler.showWarnings}</showWarnings>
                    <showDeprecation>${java.compiler.showDeprecation}</showDeprecation>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <profiles>
        <profile>
            <!-- See issue https://issues.sonatype.org/browse/OSSRH-3974 -->
            <id>sonatype-oss-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${plugin.javadoc.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- This profile is also specified in the Super POM (for now) and activated by maven-jgitflow-plugin:release-finish -->
            <id>release-profile</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <!-- untested! -->
                <github.site.merge>false</github.site.merge>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <configuration>
                            <updateReleaseInfo>true</updateReleaseInfo>
                        </configuration>
                    </plugin>
                    <!-- This plugin is required by https://oss.sonatype.org -->
                    <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>github</id>
            <properties>
                <github.global.server>github</github.global.server>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-site-plugin</artifactId>
                        <configuration>
                            <skipDeploy>true</skipDeploy>
                        </configuration>
                    </plugin>
                    <!-- Note: v0.12 seems to be slow even with merge=true! Consider to use the git wagon and standard site plugin instead! -->
                    <plugin>
                        <groupId>com.github.github</groupId>
                        <artifactId>site-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>site-deploy</phase>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    
</project>
