<?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>dev.mccue</groupId>
  <artifactId>magic-bean</artifactId>
  <version>2025.02.09</version>
  <packaging>jar</packaging>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <junit.version>5.10.2</junit.version>
  </properties>

  <name>Magic Bean</name>
  <description>A very basic library which will generate getters and setters.</description>
  <url>https://github.com/bowbahdoe/magic-bean</url>

  <developers>
    <developer>
      <name>Ethan McCue</name>
      <email>ethan@mccue.dev</email>
      <organization>McCue Software Solutions</organization>
      <organizationUrl>https://www.mccue.dev</organizationUrl>
    </developer>
  </developers>

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

  <scm>
    <connection>scm:git:git://github.com/bowbahdoe/magic-bean.git</connection>
    <developerConnection>scm:git:ssh://github.com:bowbahdoe/magic-bean.git</developerConnection>
    <url>http://github.com/bowbahdoe/magic-bean/tree/master</url>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>dev.mccue</groupId>
      <artifactId>tools-javac</artifactId>
      <version>2025.01.21</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>21</source>
          <target>21</target>
          <compilerArgument>-proc:none</compilerArgument>
        </configuration>
      </plugin>

      <plugin>  <!-- Create sources.jar -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.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>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>


  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jreleaser</groupId>
            <artifactId>jreleaser-maven-plugin</artifactId>
            <version>1.11.0</version>
            <configuration>
              <jreleaser>
                <project>
                  <copyright>2024</copyright>
                  <versionPattern><type>CHRONVER</type></versionPattern>
                </project>
                <signing>
                  <active>ALWAYS</active>
                  <armored>true</armored>
                </signing>
                <deploy>
                  <maven>
                    <nexus2>
                      <maven-central>
                        <active>ALWAYS</active>
                        <url>https://s01.oss.sonatype.org/service/local</url>;
                        <closeRepository>true</closeRepository>
                        <releaseRepository>true</releaseRepository>
                        <stagingRepositories>target/staging-deploy</stagingRepositories>
                      </maven-central>
                    </nexus2>
                  </maven>
                </deploy>
              </jreleaser>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
