<?xml version="1.0" encoding="UTF-8"?>
<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>io.vertx</groupId>
    <artifactId>vertx-parent</artifactId>
    <version>14</version>
  </parent>

  <groupId>cn.ihomeland.slides</groupId>
  <artifactId>slides</artifactId>
  <version>1.0.2</version>
  <packaging>jar</packaging>

  <name>The slides application that uses reveal.js as the JS Slides engine</name>

  <properties>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.encoding>UTF-8</maven.compiler.encoding>

    <vertx-maven-plugin.version>1.0.18</vertx-maven-plugin.version>
    <vertx.verticle>cn.ihomeland.slides.SlidesVerticle</vertx.verticle>
    <vertx.version>3.7.1</vertx.version>
    <version.slf4j>1.7.25</version.slf4j>
    <version.reveal.js>3.8.0</version.reveal.js>
    <version.bootstrap>4.3.1</version.bootstrap>
  </properties>

  <scm>
    <connection>scm:git:git@github.com:gaol/slides.git</connection>
    <developerConnection>scm:git:git@github.com:gaol/slides.git</developerConnection>
    <url>https://github.com/gaol/slides</url>
    <tag>slides-1.0.0</tag>
  </scm>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <sourceFileExcludes>
            <sourceFileExclude>**/package-info.java</sourceFileExclude>
          </sourceFileExcludes>
          <sourceFileIncludes>
            <sourceFileInclude>cn/ihomeland/**/*.java</sourceFileInclude>
          </sourceFileIncludes>
          <additionalparam>-Xdoclint:none --allow-script-in-comments</additionalparam>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
      <dependency>
          <groupId>io.vertx</groupId>
          <!-- vertx-dependencies is for internal stuff -->
          <artifactId>vertx-stack-depchain</artifactId>
          <version>${vertx.version}</version>
          <type>pom</type>
          <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${version.slf4j}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${version.slf4j}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>


  <dependencies>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-rx-java2</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web-templ-freemarker</artifactId>
    </dependency>

    <dependency>
      <groupId>org.webjars.bowergithub.hakimel</groupId>
      <artifactId>reveal.js</artifactId>
      <version>${version.reveal.js}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>bootstrap</artifactId>
      <version>${version.bootstrap}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
    </dependency>
  </dependencies>

  <profiles>

    <profile>
      <id>app</id>
      <build>
        <finalName>${project.artifactId}-app</finalName>
        <plugins>
          <plugin>
            <groupId>io.reactiverse</groupId>
            <artifactId>vertx-maven-plugin</artifactId>
            <version>${vertx-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>vmp</id>
                <goals>
                  <goal>initialize</goal>
                  <goal>package</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <redeploy>false</redeploy>
              <verticle>${vertx.verticle}</verticle>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

	<profile>
	    <id>jdk11</id>
	    <activation>
		<jdk>11</jdk>
	    </activation>
	    <dependencies>
		<dependency>
		    <groupId>javax.xml.bind</groupId>
		    <artifactId>jaxb-api</artifactId>
		    <version>2.3.1</version>
		</dependency>
		<dependency>
		    <groupId>org.glassfish.jaxb</groupId>
		    <artifactId>jaxb-runtime</artifactId>
		    <version>2.3.1</version>
		</dependency>
	    </dependencies>
	</profile>

    <profile>
      <id>openshift</id>
      <build>
        <plugins>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>fabric8-maven-plugin</artifactId>
            <version>3.5.33</version>
            <executions>
              <execution>
                <id>fmp</id>
                <goals>
                  <goal>resource</goal>
                  <goal>build</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>
</project>
