<!--

     Copyright 2005-2016 Red Hat, Inc.

     Red Hat licenses this file to you 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-project</artifactId>
        <version>3.0.8</version>
    </parent>

    <groupId>io.fabric8</groupId>
    <artifactId>fabric8-parent</artifactId>
    <version>3.0.8</version>
    <packaging>pom</packaging>

    <name>Fabric8 :: Parent</name>
    <url>http://fabric8.io/</url>

    <properties>
        <maven-assembly-plugin.version>2.6</maven-assembly-plugin.version>
        <maven-build-helper-plugin.version>1.9.1</maven-build-helper-plugin.version>
        <maven-bundle-plugin.version>2.5.4</maven-bundle-plugin.version>
        <maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
        <maven-notices-plugin.version>1.38</maven-notices-plugin.version>
        <maven-bundle-summary-plugin.version>1.34</maven-bundle-summary-plugin.version>
        <maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version>
        <maven-deploy-plugin.version>2.8.1</maven-deploy-plugin.version>
        <maven-shade-plugin.version>2.4.1</maven-shade-plugin.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.fabric8</groupId>
                <artifactId>fabric8-cxf</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.fabric8</groupId>
                <artifactId>fabric8-cxf-plugins</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.fabric8</groupId>
                <artifactId>kubernetes-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.fabric8</groupId>
                <artifactId>fabric8-utils</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.fabric8.etcd</groupId>
                <artifactId>fabric8-etcd-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.fabric8.etcd</groupId>
                <artifactId>fabric8-etcd-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.fabric8.etcd.reader</groupId>
                <artifactId>fabric8-etcd-reader-gson</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.fabric8.etcd.reader</groupId>
                <artifactId>fabric8-etcd-reader-jackson</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- Internal testing modules -->
            <dependency>
                <groupId>io.fabric8.etcd</groupId>
                <artifactId>fabric8-etcd-core</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${maven-bundle-plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions>
                            <Bundle-DocURL>http://fabric8.io/</Bundle-DocURL>
                            <_include>-osgi.bnd</_include>
                        </instructions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-scr-plugin</artifactId>
                    <version>${felix-scr-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven-assembly-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${maven-shade-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${maven-build-helper-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.apache.felix
                                        </groupId>
                                        <artifactId>
                                            maven-bundle-plugin
                                        </artifactId>
                                        <versionRange>
                                            [2.1.0,)
                                        </versionRange>
                                        <goals>
                                            <goal>cleanVersions</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.fusesource.mvnplugins</groupId>
                    <artifactId>maven-notices-plugin</artifactId>
                    <version>${maven-notices-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-java2ws-plugin</artifactId>
                    <version>${cxf.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.cxf</groupId>
                            <artifactId>cxf-rt-frontend-jaxws</artifactId>
                            <version>${cxf.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.cxf</groupId>
                            <artifactId>cxf-rt-frontend-simple</artifactId>
                            <version>${cxf.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>process-classes</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>java2ws</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-java2wadl-plugin</artifactId>
                    <version>${cxf.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>process-classes</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>java2wadl</goal>
                            </goals>
                        </execution>
                    </executions>
            </plugin>

            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <forkCount>1</forkCount>
                    <reuseForks>true</reuseForks>
                    <!-- these settings are mandatory to avoid SureFire giving a bogus system property to the web container -->
                    <useSystemClassLoader>false</useSystemClassLoader>
                    <useManifestOnlyJar>false</useManifestOnlyJar>
                    <failIfNoTests>false</failIfNoTests>
                    <runOrder>alphabetical</runOrder>
                    <systemPropertyVariables>
                        <basedir>${basedir}</basedir>
                        <project.version>${project.version}</project.version>
                    </systemPropertyVariables>
                    <includes>
                            <include>**/*TestSuite.java</include>
                            <include>**/*Test.java</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <inherited>true</inherited>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <version>${maven-javadoc-plugin.version}</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-deploy-plugin</artifactId>
               <version>${maven-deploy-plugin.version}</version>
            </plugin>
        </plugins>
    </build>

    <profiles>

        <!-- Do a license check by running : mvn -P license license:check Update the license check by running : mvn -P license license:format -->
        <profile>
            <id>license</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mycila.maven-license-plugin</groupId>
                        <artifactId>maven-license-plugin</artifactId>
                        <version>1.6.0</version>
                        <configuration>
                            <quiet>false</quiet>
                            <header>src/main/resources/license-header.txt</header>
                            <aggregate>true</aggregate>
                            <includes>
                                <include>src/**</include>
                                <include>**/pom.xml</include>
                            </includes>
                            <excludes>
                                <!-- can remove once http://code.google.com/p/maven-license-plugin/issues/detail?id=72 is resolved -->
                                <exclude>**/*.scaml</exclude>
                                <exclude>**/LICENSE.txt</exclude>
                                <exclude>**/LICENSE</exclude>
                                <exclude>**/.svn/**</exclude>

                                <!-- ignore files produced during a build -->
                                <exclude>**/target/**</exclude>

                                <!-- ignore binary files -->
                                <exclude>**/*.jpg</exclude>
                                <exclude>**/*.png</exclude>
                                <exclude>**/*.gif</exclude>
                                <exclude>**/*.ico</exclude>
                                <exclude>**/*.keystore</exclude>

                            </excludes>
                            <useDefaultExcludes>false</useDefaultExcludes>
                            <mapping>
                                <jj>JAVADOC_STYLE</jj>
                                <proto>DOUBLESLASH_STYLE</proto>
                                <index>SCRIPT_STYLE</index>
                            </mapping>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
   </profiles>
  
</project>
