<?xml version="1.0" encoding="UTF-8"?>
<!-- -->
<!-- SMART COSMOS Framework -->
<!-- Copyright (C) 2013-2015, Smartrac Technology Fletcher, Inc. -->
<!-- 267 Cane Creek Rd, Fletcher, NC, 28732, USA -->
<!-- All Rights Reserved. -->
<!-- -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
<!-- You may obtain a copy of the License at -->
<!-- -->
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- -->
<!-- Unless required by applicable law or agreed to in writing, software -->
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
<!-- See the License for the specific language governing permissions and -->
<!-- limitations under the License. -->
<!-- -->
<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>
    <parent>
        <groupId>net.smartcosmos</groupId>
        <artifactId>smartcosmos-framework-root</artifactId>
        <version>2.13.1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>smartcosmos-framework-parent</artifactId>
    <packaging>pom</packaging>
    <name>SMART COSMOS Framework Parent</name>
    <description>This POM file forms the foundation of all POM files that are specific to JAVA packaging.</description>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>net.smartcosmos</groupId>
                <artifactId>smartcosmos-dependencies</artifactId>
                <version>2.13.1</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <!-- Turn on filtering by default for application properties -->
        <resources>
            <resource>
                <filtering>true</filtering>
                <directory>${basedir}/src/main/resources</directory>
                <includes>
                    <include>**/*.yml</include>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
                <excludes>
                    <exclude>**/*.yml</exclude>
                    <exclude>**/*.properties</exclude>
                    <exclude>**/*.xml</exclude>
                </excludes>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <filtering>true</filtering>
                <directory>${basedir}/src/test/resources</directory>
                <includes>
                    <include>**/*.yml</include>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
            </testResource>
            <testResource>
                <directory>${basedir}/src/test/resources</directory>
                <excludes>
                    <exclude>**/*.yml</exclude>
                    <exclude>**/*.properties</exclude>
                    <exclude>**/*.xml</exclude>
                </excludes>
            </testResource>
        </testResources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-maven-plugin</artifactId>
                    <version>1.14</version>
                </plugin>
                <plugin>
                    <groupId>com.mysema.maven</groupId>
                    <artifactId>apt-maven-plugin</artifactId>
                    <version>1.1.3</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.querydsl</groupId>
                            <artifactId>querydsl-apt</artifactId>
                            <version>${querydsl.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>process</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>target/generated-sources/java</outputDirectory>
                                <processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
                                <options>
                                    <querydsl.entityAccessors>true</querydsl.entityAccessors>
                                </options>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>3.0.2</version>
                    <configuration>
                        <failOnError>false</failOnError>
                        <!-- Enables analysis which takes more memory but finds more bugs. If you run out of memory, changes the value of the effort element to 'Low'. -->
                        <effort>Max</effort>
                        <!-- Reports all bugs (other values are medium and max) -->
                        <threshold>Low</threshold>
                        <!-- Produces XML report -->
                        <xmlOutput>true</xmlOutput>
                        <!-- Configures the directory in which the XML report is created -->
                        <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
                    </configuration>
                    <executions>
                        <!-- Ensures that FindBugs inspects source code when project is compiled. -->
                        <execution>
                            <id>analyze-compile</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>compile</phase>
                        </execution>
                    </executions>
                </plugin>
                <!-- By default this plugin isn't active anywhere, since it re-formats code. It's just declared here to show it's possible. -->
                <plugin>
                    <groupId>net.revelc.code</groupId>
                    <artifactId>formatter-maven-plugin</artifactId>
                    <configuration>
                        <configFile>eclipse/formatter-config.xml</configFile>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>net.smartcosmos</groupId>
                            <artifactId>smartcosmos-builds-tools</artifactId>
                            <version>2.13.1</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>format</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- This automatically puts git repository information into the JAR file when compiled. -->
                <plugin>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <version>2.1.15</version>
                    <configuration>
                        <verbose>true</verbose>
                        <dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
                        <generateGitPropertiesFile>true</generateGitPropertiesFile>
                        <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>revision</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>1.8</version>
                    <configuration>
                        <licenseName>apache_v2</licenseName>
                        <projectName>${project.name}</projectName>
                        <inceptionYear>2013</inceptionYear>
                        <processStartTag>*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*</processStartTag>
                        <sectionDelimiter>===============================================================================</sectionDelimiter>
                        <processEndTag>#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#</processEndTag>
                        <licenseResolver>classpath://license</licenseResolver>
                        <includes>
                            <include>**/*.java</include>
                        </includes>
                        <excludes>
                            <exclude>**/package-info.java</exclude>
                        </excludes>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>net.smartcosmos</groupId>
                            <artifactId>smartcosmos-builds-tools</artifactId>
                            <version>2.13.1</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>update-file-header</goal>
                            </goals>
                            <phase>prepare-package</phase>
                        </execution>
                    </executions>
                </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.apache.maven.plugins</groupId>
                                        <artifactId>maven-dependency-plugin</artifactId>
                                        <versionRange>[1.0,)</versionRange>
                                        <goals>
                                            <goal>copy</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute>true</execute>
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-enforcer-plugin</artifactId>
                                        <versionRange>[1.0,)</versionRange>
                                        <goals>
                                            <goal>enforce</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute>true</execute>
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>exec-maven-plugin</artifactId>
                                        <versionRange>[1.2.1,)</versionRange>
                                        <goals>
                                            <goal>java</goal>
                                            <goal>exec</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore>true</ignore>
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>net.revelc.code</groupId>
                                        <artifactId>formatter-maven-plugin</artifactId>
                                        <versionRange>[0.5.2,)</versionRange>
                                        <goals>
                                            <goal>format</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore>true</ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
                <!-- Checkstyle configuration, this is used internally and is actually removed from the extension-starter, but it can be added back in. -->
                <plugin>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <configuration>
                        <configLocation>checkstyle/base.xml</configLocation>
                        <!-- <includeTestSourceDirectory>true</includeTestSourceDirectory> -->
                        <failOnViolation>true</failOnViolation>
                        <excludes>**/generated-sources/**/*</excludes>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>6.8</version>
                            <scope>compile</scope>
                        </dependency>
                        <dependency>
                            <groupId>net.smartcosmos</groupId>
                            <artifactId>smartcosmos-builds-tools</artifactId>
                            <version>2.13.1</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>checkstyle</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>validate</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.5.1</version>
                    <configuration>
                        <compilerVersion>${java.version}</compilerVersion>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.13</version>
                    <executions>
                        <!-- Even thought failsafe was specifically designed for integration tests it will not bind to the integration test by default. -->
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <!-- Failure reporting actually occurs under verify, if you were to skip this phase the build would continue even with failures. This is because
									integration tests are designed to run in parallel -->
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Apply more sensible defaults for user projects -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <configuration>
                        <archive>
                            <manifest>
                                <mainClass>${start-class}</mainClass>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Ignore Abstract tests and Integration Tests. -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <argLine>-Xmx256m</argLine>
                        <!-- Force alphabetical order to have a reproducible build -->
                        <runOrder>alphabetical</runOrder>
                        <includes>
                            <include>**/*Tests.java</include>
                            <include>**/*Test.java</include>
                        </includes>
                        <excludes>
                            <exclude>**/Abstract*.java</exclude>
                            <exclude>**/IT*.java</exclude>
                            <exclude>**/*IT.java</exclude>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- If you want to format the code on verification. -->
            <!-- <plugin> <groupId>net.revelc.code</groupId> <artifactId>formatter-maven-plugin</artifactId> </plugin> -->
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>maven-restlet</id>
            <name>Restlet repository</name>
            <url>http://maven.restlet.com</url>
        </repository>
    </repositories>

</project>
