<?xml version="1.0" encoding="UTF-8"?>
<!--
        Copyright 2009 OW2 Chameleon 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <artifactId>parent-pom</artifactId>
        <groupId>org.ow2.chameleon</groupId>
        <version>0.3.2</version>
    </parent>

    <groupId>org.ow2.chameleon.fuchsia</groupId>
    <artifactId>fuchsia-parent</artifactId>
    <version>0.0.2</version>

    <name>Fuchsia Parent</name>
    <packaging>pom</packaging>

    <!-- ========== -->
    <!-- PROPERTIES -->
    <!-- ========== -->
    <properties>
        <!-- Dependencies version -->
        <ipojo.version>1.11.0</ipojo.version>
        <ipojo.plugin.version>1.11.0</ipojo.plugin.version>
        <osgi-core.version>5.0.0</osgi-core.version>
        <osgi.version>4.3.1</osgi.version>
        <felix.framework.version>4.2.1</felix.framework.version>
        <felix.configadmin.version>1.6.0</felix.configadmin.version>
        <felix.eventadmin.version>1.3.2</felix.eventadmin.version>
        <commons-io>2.4</commons-io>
        <felix.log.version>1.0.1</felix.log.version>
        <slf4j.version>1.6.6</slf4j.version>
        <chameleon.version>1.0.1</chameleon.version>
        <apacheCXF.version>1.3</apacheCXF.version>
        <com.rabbitmq>3.1.4</com.rabbitmq>

        <!-- Plugins versions -->
        <bundle.plugin.version>2.4.0</bundle.plugin.version>
        <compiler.plugin.version>3.1</compiler.plugin.version>
        <javadoc.plugin.version>2.9.1</javadoc.plugin.version>
        <depends.plugin.version>1.2</depends.plugin.version>
        <release.plugin.version>2.4.1</release.plugin.version>
        <site.plugin.version>3.3</site.plugin.version>
        <github.site.plugin.version>0.9</github.site.plugin.version>
        <resources.plugin.version>2.6</resources.plugin.version>
        <dependency.plugin.version>2.8</dependency.plugin.version>
        <pax.plugin.version>1.5</pax.plugin.version>
        <license.plugin.version>1.6</license.plugin.version>

        <!-- Extensions versions -->
        <wagon.extension.version>2.2</wagon.extension.version>

        <!-- Test dependencies version -->
        <mockito.version>1.9.5</mockito.version>
        <junit.version>4.11</junit.version>
        <assertj-core.version>1.4.0</assertj-core.version>
        <fest-reflect.version>1.4.1</fest-reflect.version>
        <osgi-helpers.version>0.6.2</osgi-helpers.version>
        <pax-exam.version>3.0.1</pax-exam.version>
        <pax-swissbox.version>1.3.2</pax-swissbox.version>
        <tinybundles.version>1.0.0</tinybundles.version>
        <ops4j.version>1.4.0</ops4j.version>
        <tinybundles-ipojo.version>0.3.0</tinybundles-ipojo.version>
        <TEST.slf4j-api.version>1.5.6</TEST.slf4j-api.version>
        <TEST.logback-classic.version>0.9.6</TEST.logback-classic.version>

        <!-- Encoding -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- The location where the chameleon distribution.xml is downloaded and expanded -->
        <chameleon.destination>${project.build.directory}/chameleon-distribution</chameleon.destination>

        <!-- The base directory of the distribution.xml -->
        <distribution.baseDirectory>Distribution-Fuchsia-${project.version}</distribution.baseDirectory>

        <!-- Website deploy -->
        <site.path>snapshot</site.path>
        <github.global.server>github</github.global.server>
        <asciidoctor.version>0.1.3.1</asciidoctor.version>
        <github.global.server>github</github.global.server>
        <project.url>https://github.com/ow2-chameleon/fuchsia/</project.url>
    </properties>


    <!-- ======== -->
    <!-- PROFILES -->
    <!-- ======== -->
    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>

            <modules>
                <module>distribution</module>
                <module>core</module>
                <module>core-it</module>
                <module>bases</module>
                <module>importers</module>
                <module>exporters</module>
                <module>discoveries</module>
                <module>tools</module>
                <module>testing</module>
            </modules>
        </profile>
        <profile>
            <!-- Continuous integration profile, must be the same than the default profile without the integrations tests -->
            <id>ci</id>
            <modules>
                <module>distribution</module>
                <module>core</module>
                <module>bases</module>
                <module>importers</module>
                <module>exporters</module>
                <module>discoveries</module>
                <module>tools</module>
                <module>testing</module>
            </modules>
        </profile>

        <profile>
            <id>examples</id>
            <modules>
                <module>examples</module>
            </modules>
        </profile>

        <profile>
            <id>distribution</id>
            <modules>
                <module>distribution</module>
            </modules>
        </profile>

        <profile>
            <id>release</id>
            <modules>
                <module>core</module>
                <module>bases</module>
                <module>importers</module>
                <module>exporters</module>
                <module>discoveries</module>
                <module>tools</module>
                <module>testing</module>
                <module>distribution</module>
                <module>examples</module>
            </modules>
        </profile>
    </profiles>

    <!-- === -->
    <!-- SCM -->
    <!-- === -->
    <scm>
        <connection>scm:git:git@github.com:ow2-chameleon/fuchsia.git</connection>
        <url>scm:git:git@github.com:ow2-chameleon/fuchsia.git</url>
        <developerConnection>scm:git:git@github.com:ow2-chameleon/fuchsia.git</developerConnection>
        <tag>fuchsia-parent-0.0.2</tag>
    </scm>

    <!-- ============ -->
    <!-- REPOSITORIES -->
    <!-- ============ -->
    <repositories>
        <repository>
            <id>ow2-public</id>
            <name>OW2 Maven Repository</name>
            <url>http://repository.ow2.org/nexus/content/repositories/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <repository>
            <id>ow2-snapshots</id>
            <name>OW2 Maven Snapshots Repository</name>
            <url>http://repository.ow2.org/nexus/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <repository>
            <id>upnp-release</id>
            <name>ow2 Maven Repository [OLD]</name>
            <url>http://repo1.maven.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>

        <repository>
            <id>java.net-public</id>
            <name>Maven Java Net Snapshots and Releases</name>
            <url>https://maven.java.net/content/groups/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <repository>
            <id>com.springsource.repository.bundles.release</id>
            <name>EBR Spring Release Repository</name>
            <url>http://repository.springsource.com/maven/bundles/release</url>
        </repository>

        <repository>
            <id>com.springsource.repository.bundles.external</id>
            <name>EBR External Release Repository</name>
            <url>http://repository.springsource.com/maven/bundles/external</url>
        </repository>

    </repositories>


    <!-- ===================== -->
    <!-- DEPENDENCY MANAGEMENT -->
    <!-- ===================== -->
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.ow2.chameleon.fuchsia</groupId>
                <artifactId>org.ow2.chameleon.fuchsia.core</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- OSGi -->
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>${osgi-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.compendium</artifactId>
                <version>${osgi.version}</version>
            </dependency>

            <!-- Felix -->
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.framework</artifactId>
                <version>${felix.framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.configadmin</artifactId>
                <version>${felix.configadmin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.log</artifactId>
                <version>${felix.log.version}</version>
            </dependency>

            <!-- iPOJO -->
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.ipojo</artifactId>
                <version>${ipojo.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.ipojo.api</artifactId>
                <version>${ipojo.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.ipojo.annotations</artifactId>
                <version>${ipojo.version}</version>
            </dependency>

            <!-- Rabbit MQ -->
            <dependency>
                <groupId>com.rabbitmq</groupId>
                <artifactId>amqp-client</artifactId>
                <version>${com.rabbitmq}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.eventadmin</artifactId>
                <version>${felix.eventadmin.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io}</version>
            </dependency>

            <!--SLF4J-->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <!-- TESTS DEPENDENCIES -->
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.enterprise</artifactId>
                <version>5.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.chameleon.testing</groupId>
                <artifactId>osgi-helpers</artifactId>
                <version>${osgi-helpers.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.chameleon.fuchsia.testing</groupId>
                <artifactId>fuchsia-helpers</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <type>jar</type>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.exam</groupId>
                <artifactId>pax-exam</artifactId>
                <version>${pax-exam.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.exam</groupId>
                <artifactId>pax-exam-junit4</artifactId>
                <version>${pax-exam.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.exam</groupId>
                <artifactId>pax-exam-container-native</artifactId>
                <version>${pax-exam.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.exam</groupId>
                <artifactId>pax-exam-link-mvn</artifactId>
                <version>${pax-exam.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.tinybundles</groupId>
                <artifactId>tinybundles</artifactId>
                <version>${tinybundles.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.swissbox</groupId>
                <artifactId>pax-swissbox-bnd</artifactId>
                <version>${pax-swissbox.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ops4j.base</groupId>
                <artifactId>ops4j-base</artifactId>
                <version>${ops4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.chameleon.testing</groupId>
                <artifactId>tinybundles-ipojo</artifactId>
                <version>${tinybundles-ipojo.version}</version>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.easytesting</groupId>
                <artifactId>fest-reflect</artifactId>
                <version>${fest-reflect.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${TEST.logback-classic.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- ===== -->
    <!-- BUILD -->
    <!-- ===== -->
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${bundle.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-ipojo-plugin</artifactId>
                    <version>${ipojo.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${compiler.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.servicemix.tooling</groupId>
                    <artifactId>depends-maven-plugin</artifactId>
                    <version>${depends.plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${resources.plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${dependency.plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-pax-plugin</artifactId>
                    <groupId>org.ops4j</groupId>
                    <version>${pax.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${license.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${release.plugin.version}</version>
                <configuration>
                    <goals>deploy</goals>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctor-maven-plugin</artifactId>
                <version>${asciidoctor.version}</version>
                <executions>
                    <execution>
                        <id>render-asciidoc</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>render-asciidoc-site</id>
                        <phase>site</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sourceDirectory>src/site/asciidoc</sourceDirectory>
                    <outputDirectory>${project.build.directory}/site/</outputDirectory>
                    <templateDir>src/site/resources/themes</templateDir>
                    <backend>html</backend>
                    <compact>true</compact>
                    <attributes>
                        <docVersion>${project.version}</docVersion>
                        <theme>volnitsky</theme>
                        <stylesheet>stylesheets/asciidoc.css</stylesheet>
                    </attributes>
                </configuration>
            </plugin>


            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/site/</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/site/resources</directory>
                                    <filtering>false</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Deploy the web site -->
            <plugin>
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
                <version>${github.site.plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>site</goal>
                        </goals>
                        <phase>site</phase>
                        <configuration>
                            <message>Building site for ${project.version}</message>
                            <merge>true</merge>
                            <repositoryName>fuchsia</repositoryName>
                            <repositoryOwner>ow2-chameleon</repositoryOwner>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <licenseName>apache_v2</licenseName>
                    <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                    <projectName>OW2 Chameleon - Fuchsia Framework</projectName>
                    <excludes>
                        <exclude>site/resources/**</exclude>
                        <exclude>*/**/*Test*.java</exclude>
                    </excludes>
                    <roots>
                        <root>src/</root>
                        <root>target/generated-sources</root>
                        <root>target/processed-sources</root>
                        <!-- do not include test resources -->
                        <!-- do not include external assets -->
                    </roots>
                </configuration>
                <executions>
                    <execution>
                        <id>update-headers</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>


        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-webdav-jackrabbit</artifactId>
                <version>${wagon.extension.version}</version>
            </extension>
        </extensions>
    </build>

</project>

