<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>org.jadice.gwt.spring</groupId>
  <artifactId>gwt-spring-boot-starter-root</artifactId>
  <version>1.1.7</version>

  <packaging>pom</packaging>
  <name>gwt-spring-boot-starter</name>
  <description>A Spring-Boot Starter for Google Web Toolkit (GWT) applications</description>
  <url>https://github.com/levigo/gwt-spring-boot-starter</url>
  
  <properties>
    <version.java>1.8</version.java>
    <java.version>${version.java}</java.version>
    <maven.compiler.source>${version.java}</maven.compiler.source>
    <maven.compiler.target>${version.java}</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <spring-boot.version>2.6.6</spring-boot.version>
    <gwt.version>2.9.0</gwt.version>
  </properties>

  <modules>
    <module>bom</module>
    <module>example</module>
    <module>starter</module>
    <module>devmode</module>
  </modules>

  <scm>
    <connection>scm:git:https://github.com/levigo/url-crypto-kit.git</connection>
    <url>https://github.com/levigo/url-crypto-kit</url>
  </scm>

  <licenses>
    <license>
      <name>BSD 3-Clause License</name>
      <url>https://opensource.org/licenses/BSD-3-Clause</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <dependencyManagement>
    <dependencies>
      <!-- Import dependency management from Spring Boot -->
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${spring-boot.version}</version>
      </plugin>
    </plugins>
  </build>

  <developers>
    <developer>
      <name>Jörg Henne</name>
      <email>hennejg@gmail.com</email>
      <organizationUrl>https://levigo.de</organizationUrl>
    </developer>
  </developers>

  <profiles>
    <!-- Activate using the release property: mvn clean install -Prelease -->
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>release</name>
        </property>
      </activation>

      <build>
        <plugins>
          <!-- To release to Maven central -->
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>

          <!-- To generate javadoc -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.1</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.3.2</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- To sign the artifacts -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <gpgArguments>
                <gpgArgument>--pinentry-mode</gpgArgument>
                <gpgArgument>loopback</gpgArgument>
              </gpgArguments>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
