<?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>

  <groupId>de.chkal.mvc-toolbox</groupId>
  <artifactId>mvc-toolbox-parent</artifactId>
  <version>2.0.0</version>
  <packaging>pom</packaging>

  <name>MVC Toolbox - Parent</name>
  <description>MVC Toolbox - Parent</description>
  <url>https://github.com/mvc-toolbox/mvc-toolbox</url>

  <properties>
    <maven.compiler.release>11</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <jakartaee-platform.version>9.1.0</jakartaee-platform.version>

    <annotation-api.version>2.1.1</annotation-api.version>

    <cdi.spec.version>3.0.1</cdi.spec.version>
    <weld.version>4.0.3.Final</weld.version>
    <weld-se-core.version>4.0.3.Final</weld-se-core.version>

    <jaxrs.spec.version>3.0.0</jaxrs.spec.version>
    <jersey.version>3.0.5</jersey.version>

    <mvc.spec.version>2.0.0</mvc.spec.version>
    <krazo.version>2.0.1</krazo.version>

    <validation.spec.version>3.0.2</validation.spec.version>
    <hibernate.validator.version>5.2.1.Final</hibernate.validator.version>

    <jsp.spec.version>3.0.0</jsp.spec.version>
    <jstl.version>2.0.0</jstl.version>
    <jstl-impl.version>2.0.0</jstl-impl.version>
    <bootstrap.version>5.1.3</bootstrap.version>

    <mockito.version>4.6.1</mockito.version>
    <junit.version>4.13.2</junit.version>
  </properties>

  <modules>
    <module>core</module>
    <module>jsp</module>
    <module>showcase</module>
  </modules>

  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:mvc-toolbox/mvc-toolbox.git</connection>
    <developerConnection>scm:git:git@github.com:mvc-toolbox/mvc-toolbox.git</developerConnection>
    <url>git@github.com:mvc-toolbox/mvc-toolbox.git</url>
    <tag>master</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <developers>
    <developer>
      <id>chkal</id>
      <email>christian@kaltepoth.de</email>
      <name>Christian Kaltepoth</name>
      <timezone>CET</timezone>
    </developer>
  </developers>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>jakarta.platform</groupId>
        <artifactId>jakarta.jakartaee-api</artifactId>
        <version>${jakartaee-platform.version}</version>
        <scope>provided</scope>
      </dependency>


      <dependency>
        <groupId>jakarta.servlet.jsp</groupId>
        <artifactId>jakarta.servlet.jsp-api</artifactId>
        <version>${jsp.spec.version}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>jakarta.servlet.jsp.jstl</groupId>
        <artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
        <version>${jstl.version}</version>
      </dependency>

      <dependency>
        <groupId>org.glassfish.web</groupId>
        <artifactId>jakarta.servlet.jsp.jstl</artifactId>
        <version>${jstl-impl.version}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>jakarta.mvc</groupId>
        <artifactId>jakarta.mvc-api</artifactId>
        <version>${mvc.spec.version}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>jakarta.ws.rs</groupId>
        <artifactId>jakarta.ws.rs-api</artifactId>
        <version>${jaxrs.spec.version}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>jakarta.enterprise</groupId>
        <artifactId>jakarta.enterprise.cdi-api</artifactId>
        <version>${cdi.spec.version}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>jakarta.validation</groupId>
        <artifactId>jakarta.validation-api</artifactId>
        <version>${validation.spec.version}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>jakarta.annotation</groupId>
        <artifactId>jakarta.annotation-api</artifactId>
        <version>${annotation-api.version}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.webjars.bower</groupId>
        <artifactId>bootstrap</artifactId>
        <version>${bootstrap.version}</version>
      </dependency>

      <!-- Showcase dependencies -->

      <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-server</artifactId>
        <version>${jersey.version}</version>
      </dependency>

      <dependency>
        <groupId>org.glassfish.jersey.containers</groupId>
        <artifactId>jersey-container-servlet</artifactId>
        <version>${jersey.version}</version>
      </dependency>

      <dependency>
        <groupId>org.glassfish.jersey.inject</groupId>
        <artifactId>jersey-hk2</artifactId>
        <version>${jersey.version}</version>
      </dependency>

      <dependency>
        <groupId>org.glassfish.jersey.ext</groupId>
        <artifactId>jersey-bean-validation</artifactId>
        <version>${jersey.version}</version>
      </dependency>

      <dependency>
        <groupId>org.glassfish.jersey.ext.cdi</groupId>
        <artifactId>jersey-cdi1x-servlet</artifactId>
        <version>${jersey.version}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.weld.servlet</groupId>
        <artifactId>weld-servlet-core</artifactId>
        <version>${weld.version}</version>
      </dependency>

      <!-- Test dependencies -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.jboss.weld.se</groupId>
        <artifactId>weld-se-core</artifactId>
        <version>${weld.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- needed to test UriBuilder -->
      <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-common</artifactId>
        <version>${jersey.version}</version>
        <scope>test</scope>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.10.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.3.2</version>
        </plugin>

        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0-M7</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.cargo</groupId>
          <artifactId>cargo-maven3-plugin</artifactId>
          <version>1.9.13</version>
        </plugin>

        <plugin>
          <groupId>org.wildfly.plugins</groupId>
          <artifactId>wildfly-jar-maven-plugin</artifactId>
          <version>7.0.1.Final</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.1.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
              <links>
                <link>http://docs.oracle.com/javase/8/docs/api/</link>
                <link>http://docs.oracle.com/javaee/7/api/</link>
              </links>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>
  </profiles>

</project>
