<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.jboss.forge.roaster</groupId>
  <artifactId>roaster-parent</artifactId>
  <version>2.31.0.Final</version>
  <packaging>pom</packaging>
  <name>Forge Roaster - Parent</name>
  <url>https://github.com/forge/roaster</url>
  <description>
    Forge Roaster is a library for inspecting and manipulating Java types.
  </description>
  <licenses>
    <license>
      <name>Eclipse Public License version 1.0</name>
      <url>https://www.eclipse.org/legal/epl-v10.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>lincoln</id>
      <name>Lincoln Baxter, III</name>
      <email>lincolnbaxter@gmail.com</email>
    </developer>
    <developer>
      <id>gastaldi</id>
      <name>George Gastaldi</name>
      <email>gegastaldi@gmail.com</email>
    </developer>
    <developer>
      <id>koen</id>
      <name>Koen Aers</name>
      <email>koen.aers@gmail.com</email>
    </developer>
    <developer>
      <id>stale</id>
      <name>Stale Pedersen</name>
      <email>stalep@gmail.com</email>
    </developer>
    <developer>
      <id>mbenson</id>
      <name>Matt Benson</name>
      <email>gudnabrsam@gmail.com</email>
    </developer>
  </developers>

  <properties>
    <maven.compiler.target>17</maven.compiler.target>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.release>17</maven.compiler.release>
    <maven.compiler.parameters>true</maven.compiler.parameters>
    <maven.javadoc.failOnError>false</maven.javadoc.failOnError>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <version.commons-text>1.9</version.commons-text>
  </properties>

  <modules>
    <module>api</module>
    <module>impl</module>
    <module>dist</module>
    <module>bom</module>
    <module>tests</module>
  </modules>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.jboss.forge.roaster</groupId>
        <artifactId>roaster-api</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.forge.roaster</groupId>
        <artifactId>roaster-jdt</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-text</artifactId>
        <version>${version.commons-text}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <scm>
    <connection>scm:git:git://github.com/forge/roaster.git</connection>
    <developerConnection>scm:git:git@github.com:forge/roaster.git</developerConnection>
    <url>https://github.com/forge/roaster</url>
    <tag>2.31.0.Final</tag>
  </scm>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.3.1</version>
        <inherited>true</inherited>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <prepareGoals>clean install</prepareGoals>
          <releaseProfiles>release</releaseProfiles>
          <signTag>true</signTag>
          <tagNameFormat>@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
      <!-- Attach source jar to all builds.  Runs during the package phase.-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.4.0</version>
        <inherited>true</inherited>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <archive>
            <index>true</index>
            <manifest>
              <addDefaultSpecificationEntries>
                true
              </addDefaultSpecificationEntries>
              <addDefaultImplementationEntries>
                true
              </addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
              <Implementation-URL>${project.url}</Implementation-URL>
              <Java-Version>${java.version}</Java-Version>
              <Java-Vendor>${java.vendor}</Java-Vendor>
              <Os-Name>${os.name}</Os-Name>
              <Os-Arch>${os.arch}</Os-Arch>
              <Os-Version>${os.version}</Os-Version>
              <Scm-Url>${project.scm.url}</Scm-Url>
              <Scm-Connection>${project.scm.connection}</Scm-Connection>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.9.0</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
          <autoPublish>true</autoPublish>
          <waitUntil>published</waitUntil>
          <excludeArtifacts>roaster-tests</excludeArtifacts>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.12.0</version>
            <inherited>true</inherited>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <failOnError>false</failOnError>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- This will sign the artifact, the POM, and all attached artifacts -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.8</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

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

