<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>io.xlate</groupId>
  <artifactId>property-inject</artifactId>
  <version>2.0.1</version>

  <name>Property Injection for Java</name>
  <description>Inject values from java.util.Properties using the Java CDI framework</description>
  <url>https://github.com/xlate/property-inject</url>

  <issueManagement>
    <url>https://github.com/xlate/property-inject/issues</url>
    <system>GitHub Issues</system>
  </issueManagement>

  <scm>
    <url>https://github.com/xlate/property-inject</url>
    <connection>scm:git:https://github.com/xlate/property-inject.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/xlate/property-inject.git</developerConnection>
    <tag>v2.0.1</tag>
  </scm>

  <licenses>
    <license>
      <name>GNU AFFERO GENERAL PUBLIC LICENSE v3</name>
      <url>http://www.fsf.org/licensing/licenses/agpl-3.0.html</url>
      <distribution>repo</distribution>
      <comments>OSS use license</comments>
    </license>
    <license>
      <name>MIT License</name>
      <url>http://www.opensource.org/licenses/mit-license.php</url>
      <distribution>repo</distribution>
      <comments>Commercial use license</comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Michael Edgar</name>
      <organizationUrl>http://www.xlate.io/</organizationUrl>
    </developer>
  </developers>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

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

    <!-- Sonar settings -->
    <sonar.projectKey>xlate_property-inject</sonar.projectKey>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    <sonar.organization>xlate</sonar.organization>
    <sonar.coverage.jacoco.xmlReportPaths>target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
    <!-- Dependency versions -->
    <eclipse.parsson.version>1.1.7</eclipse.parsson.version>
    <jakarta.enterprise.cdi-api>4.0.1</jakarta.enterprise.cdi-api>
    <transformer-maven-plugin.version>0.5.0</transformer-maven-plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>jakarta.enterprise</groupId>
      <artifactId>jakarta.enterprise.cdi-api</artifactId>
      <version>${jakarta.enterprise.cdi-api}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.json</groupId>
      <artifactId>jakarta.json-api</artifactId>
      <version>2.1.3</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.12.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <version>5.17.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.parsson</groupId>
      <artifactId>parsson</artifactId>
      <version>${eclipse.parsson.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.weld</groupId>
      <artifactId>weld-junit5</artifactId>
      <version>5.0.0.Final</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
      <version>2.0.17</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.14.0</version>
        </plugin>
        <plugin>
          <groupId>org.eluder.coveralls</groupId>
          <artifactId>coveralls-maven-plugin</artifactId>
          <version>4.3.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.11.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.5.3</version>
        <configuration>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
          <environmentVariables>
            <INJECTED_VARIABLE>This value was set as an environment variable!</INJECTED_VARIABLE>
            <STRING7>string7value.env</STRING7>
            <RESOURCE_LOC0>file:${project.build.directory}/test-classes/io/xlate/inject/PropertyProducerBeanTest.properties</RESOURCE_LOC0>
            <RESOURCE_LOC1>file:${project.build.directory}/test-classes/io/xlate/inject/PropertyResourceProducerBeanTest.properties</RESOURCE_LOC1>
          </environmentVariables>
          <systemPropertyVariables>
            <java.util.logging.config.file>${project.build.directory}/test-classes/logging.properties</java.util.logging.config.file>
            <string6.property.name>string6value.system</string6.property.name>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>3.5.3</version>
        <configuration>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
          <environmentVariables>
            <INJECTED_VARIABLE>This value was set as an environment variable!</INJECTED_VARIABLE>
            <STRING7>string7value.env</STRING7>
            <RESOURCE_LOC0>file:${project.build.directory}/test-classes/io/xlate/inject/PropertyProducerBeanTest.properties</RESOURCE_LOC0>
            <RESOURCE_LOC1>file:${project.build.directory}/test-classes/io/xlate/inject/PropertyResourceProducerBeanTest.properties</RESOURCE_LOC1>
          </environmentVariables>
          <systemPropertyVariables>
            <java.util.logging.config.file>${project.build.directory}/test-classes/logging.properties</java.util.logging.config.file>
            <string6.property.name>string6value.system</string6.property.name>
          </systemPropertyVariables>
        </configuration>
        <executions>
          <execution>
            <id>default-integration-test</id>
            <goals>
              <goal>integration-test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.13</version>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-prepare-agent-integration</id>
            <goals>
              <goal>prepare-agent-integration</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report-integration</id>
            <goals>
              <goal>report-integration</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>**/*Test.class</exclude>
            <exclude>**/*IT.class</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
          <tagNameFormat>v@{project.version}</tagNameFormat>
          <pushChanges>false</pushChanges>
          <localCheckout>true</localCheckout>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.3.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>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <additionalOptions>-html5</additionalOptions>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.4.2</version>
            <configuration>
              <archive>
                <manifestEntries>
                  <Automatic-Module-Name>io.xlate.inject.property</Automatic-Module-Name>
                </manifestEntries>
              </archive>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.7</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.7.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
              <autoPublish>true</autoPublish>
              <waitUntil>published</waitUntil>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
