<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.vlingo.xoom</groupId>
  <artifactId>xoom-codegen</artifactId>
  <version>1.8.7</version>
  <description>Code generation library used by XOOM Designer and XOOM Turbo. (Specialized code generation for XOOM Actors, XOOM HTTP, and others are based on distinct libraries maintained in their own repositories).</description>
  <name>xoom-codegen</name>
  <url>https://github.com/vlingo/xoom-codegen</url>

  <licenses>
    <license>
      <name>Mozilla Public License 2.0</name>
      <url>https://mozilla.org/MPL/2.0/</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>vlingo</id>
      <name>VLINGO XOOM Team</name>
      <email>info@vlingo.io</email>
      <organization>vlingo</organization>
      <organizationUrl>https://vlingo.io/about/#community</organizationUrl>
    </developer>
    <developer>
      <name>Danilo Ambrosio</name>
      <email>danilo.ambrosio@gmail.com</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/vlingo/xoom-codegen.git</connection>
    <developerConnection>scm:git:ssh://github.com/vlingo/xoom-codegen.git</developerConnection>
    <url>http://github.com/vlingo/xoom-codegen/tree/master</url>
  </scm>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <graalvm.version>21.1.0</graalvm.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.freemarker</groupId>
      <artifactId>freemarker</artifactId>
      <version>2.3.31</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.8.0</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava-base</artifactId>
      <version>r03</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.graalvm.sdk</groupId>
      <artifactId>graal-sdk</artifactId>
      <version>${graalvm.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <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</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <source>8</source>
          <detectJavaApiLink>false</detectJavaApiLink>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <repository>
      <id>ossrh-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
      <releases><enabled>false</enabled></releases>
      <snapshots><enabled>true</enabled></snapshots>
    </repository>
  </repositories>

  <profiles>
    <profile>
      <id>native-image</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.graalvm.nativeimage</groupId>
            <artifactId>native-image-maven-plugin</artifactId>
            <version>${graalvm.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>native-image</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>
            <configuration>
              <imageName>${project.name}</imageName>
              <buildArgs>
                --shared
                -H:DashboardDump=${project.name} -H:+DashboardAll
                -H:+DashboardJson -H:+DashboardPretty
              </buildArgs>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sign-artifacts</id>
      <activation>
        <property>
          <name>signArtifacts</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <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>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sonatype</id>
      <activation>
        <property>
          <name>useSonatype</name>
          <value>true</value>
        </property>
      </activation>
      <distributionManagement>
        <snapshotRepository>
          <id>central-repository-ossrh</id>
          <name>Snapshots Repository OSSRH</name>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
      </distributionManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>central-repository-ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>github</id>
      <activation>
        <property>
          <name>useGitHubPackages</name>
          <value>true</value>
        </property>
      </activation>
      <distributionManagement>
        <repository>
          <id>github</id>
          <name>GitHub Packages</name>
          <url>https://maven.pkg.github.com/vlingo/xoom-platform</url>
        </repository>
      </distributionManagement>
    </profile>
    <profile>
      <!-- We only need GitHub packages during releases as syncing to central is too slow. -->
      <id>github-releases</id>
      <repositories>
        <repository>
          <id>github</id>
          <name>GitHub Packages</name>
          <url>https://maven.pkg.github.com/vlingo/xoom-platform</url>
        </repository>
      </repositories>
    </profile>
  </profiles>
</project>