<!--

    Copyright (c) 2015 Bosch Software Innovations GmbH and others.

    All rights reserved. This program and the accompanying materials
    are made available under the terms of the Eclipse Public License v1.0
    which accompanies this distribution, and is available at
    http://www.eclipse.org/legal/epl-v10.html

-->
<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>org.eclipse.hawkbit</groupId>
      <artifactId>hawkbit-parent</artifactId>
      <version>0.2.0-SNAPSHOT</version>
   </parent>
   <artifactId>docs</artifactId>
   <packaging>pom</packaging>
   <name>hawkBit :: Documentation</name>
   <description>Documenation for hawkBit</description>


   <properties>
    <jekyll.config>localconfig.yml</jekyll.config>
   </properties>


   <!-- Jekyll Linux Build -->
   <profiles>
      <profile>
         <id>jekyll-unix</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>
         <repositories>
            <repository>
               <id>rubygems-proxy</id>
               <name>Rubygems Proxy</name>
               <url>http://rubygems-proxy.torquebox.org/releases</url>
               <layout>default</layout>
               <releases>
                  <enabled>true</enabled>
               </releases>
               <snapshots>
                  <enabled>false</enabled>
                  <updatePolicy>never</updatePolicy>
               </snapshots>
            </repository>
         </repositories>
         <build>
            <plugins>
               <plugin>
                  <groupId>de.saumya.mojo</groupId>
                  <artifactId>gem-maven-plugin</artifactId>
                  <version>1.1.5</version>
                  <executions>
                     <execution>
                        <id>generate-documentation</id>
                        <goals>
                           <goal>exec</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                           <file>${project.build.directory}/rubygems/bin/jekyll</file>
                           <execArgs>build --trace --source ${project.basedir}/src/main/resources --destination ${project.build.outputDirectory} --config ${project.basedir}/src/main/resources/${jekyll.config}</execArgs>
                        </configuration>
                     </execution>
                     <execution>
                        <!-- run me with: mvn gem:exec@jekyll-serve -->
                        <id>jekyll-serve</id>
                        <goals>
                           <goal>exec</goal>
                        </goals>
                        <configuration>
                           <file>${project.build.directory}/rubygems/bin/jekyll</file>
                           <execArgs>serve --trace --source ${project.basedir}/src/main/resources --destination ${project.build.outputDirectory} --config ${project.basedir}/src/main/resources/${jekyll.config}</execArgs>
                        </configuration>
                        <phase>none</phase>
                     </execution>
                  </executions>
                  <configuration>
                     <supportNative>true</supportNative>
                     <jrubyVersion>9.0.5.0</jrubyVersion>
                     <addProjectClasspath>true</addProjectClasspath>
                     <jrubyVerbose>false</jrubyVerbose>
                  </configuration>
               </plugin>
            </plugins>
         </build>

         <dependencies>
            <dependency>
               <groupId>rubygems</groupId>
               <artifactId>jekyll</artifactId>
               <type>gem</type>
               <optional>true</optional>
            </dependency>
         </dependencies>
      </profile>

      <!-- Jekyll Windows Build -->
      <profile>
         <id>jekyll-windows</id>
         <activation>
            <os>
               <family>windows</family>
            </os>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>exec-maven-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>generate-documentation</id>
                        <goals>
                           <goal>exec</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                           <executable>Jekyll</executable>
                           <arguments>
                              <argument>build</argument>
                              <argument>--trace</argument>
                              <argument>--source</argument>
                              <argument>${project.basedir}/src/main/resources</argument>
                              <argument>--destination</argument>
                              <argument>${project.build.outputDirectory}</argument>
                              <argument>--config</argument>
                              <argument>${project.basedir}/src/main/resources/${jekyll.config}</argument>
                           </arguments>
                        </configuration>
                     </execution>
                     <execution>
                        <!-- run me with: mvn exec:exec@jekyll-serve -->
                        <id>jekyll-serve</id>
                        <goals>
                           <goal>exec</goal>
                        </goals>
                        <configuration>
                           <executable>Jekyll</executable>
                           <arguments>
                              <argument>serve</argument>
                              <argument>--trace</argument>
                              <argument>--source</argument>
                              <argument>${project.basedir}/src/main/resources</argument>
                              <argument>--destination</argument>
                              <argument>${project.build.outputDirectory}</argument>
                              <argument>--config</argument>
                              <argument>${project.basedir}/src/main/resources/${jekyll.config}</argument>
                           </arguments>
                        </configuration>
                        <phase>none</phase>
                     </execution>
                  </executions>
                  <configuration>
                     <supportNative>true</supportNative>
                     <jrubyVersion>9.0.5.0</jrubyVersion>
                     <addProjectClasspath>true</addProjectClasspath>
                     <jrubyVerbose>false</jrubyVerbose>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>

   <build>
      <plugins>
         <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
               <descriptors>
                  <descriptor>src/main/resources/assembly.xml</descriptor>
               </descriptors>
            </configuration>
            <executions>
               <execution>
                  <id>make-assembly</id>
                  <phase>package</phase>
                  <goals>
                     <goal>single</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

   <dependencyManagement>
      <dependencies>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>jekyll</artifactId>
            <version>3.1.2</version>
            <type>gem</type>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>liquid</artifactId>
            <type>gem</type>
            <version>3.0.6</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>kramdown</artifactId>
            <type>gem</type>
            <version>1.10.0</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>mercenary</artifactId>
            <type>gem</type>
            <version>0.3.5</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>safe_yaml</artifactId>
            <type>gem</type>
            <version>1.0.4</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>colorator</artifactId>
            <type>gem</type>
            <version>0.1</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>rouge</artifactId>
            <type>gem</type>
            <version>1.10.1</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>jekyll-sass-converter</artifactId>
            <type>gem</type>
            <version>1.4.0</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>sass</artifactId>
            <type>gem</type>
            <version>3.4.22</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>jekyll-watch</artifactId>
            <type>gem</type>
            <version>1.3.1</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>listen</artifactId>
            <type>gem</type>
            <version>3.0.6</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>rb-fsevent</artifactId>
            <type>gem</type>
            <version>0.9.7</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>rb-inotify</artifactId>
            <type>gem</type>
            <version>0.9.7</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>ffi</artifactId>
            <type>gem</type>
            <version>1.9.10</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>celluloid-essentials</artifactId>
            <version>0.20.5</version>
            <type>gem</type>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>celluloid-supervision</artifactId>
            <type>gem</type>
            <version>0.20.5</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>yajl-ruby</artifactId>
            <type>gem</type>
            <version>1.2.1</version>
         </dependency>
         <dependency>
            <groupId>rubygems</groupId>
            <artifactId>bundler</artifactId>
            <type>gem</type>
            <version>1.11.2</version>
         </dependency>
      </dependencies>
   </dependencyManagement>
</project>