<?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>com.github.blutorange</groupId>
  <artifactId>closure-compiler-maven-plugin</artifactId>
  <version>2.32.0</version>
  <packaging>maven-plugin</packaging>

  <name>Closure Compiler Maven Plugin</name>
  <description>Preprocess (combine, transpile, minimize) JavaScript with closure compiler.</description>
  <url>https://github.com/blutorange/closure-compiler-maven-plugin</url>
  <inceptionYear>2009</inceptionYear>

  <organization>
    <name>Andre Wachsmuth</name>
    <url>http://github.com/blutorange</url>
  </organization>

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

  <developers>
    <developer>
      <name>Samuel Santos</name>
      <url>https://samaxes.com</url>
      <roles>
        <role>Original author</role>
        <role>Developer</role>
      </roles>
      <timezone>Europe/Lisbon</timezone>
    </developer>
    <developer>
      <name>Andre Wachsmuth</name>
      <email>wachsmuth.andre@gmx.de</email>
      <url>https://github.com/blutorange</url>
      <roles>
        <role>Project owner</role>
        <role>Developer</role>
      </roles>
      <timezone>Europe/Berlin</timezone>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/blutorange/closure-compiler-maven-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:blutorange/closure-compiler-maven-plugin.git</developerConnection>
    <tag>HEAD</tag>
    <url>https://github.com/blutorange/closure-compiler-maven-plugin</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/blutorange/closure-compiler-maven-plugin/issues</url>
  </issueManagement>

  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <!-- General -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <github.global.server>github</github.global.server>
    <maven.version>3.9.9</maven.version>

    <!-- Dependencies -->
    <closure-compiler.version>v20240317</closure-compiler.version>
    <commons-io.version>2.18.0</commons-io.version>
    <commons-collections4.version>4.4</commons-collections4.version>
    <commons-lang3.version>3.17.0</commons-lang3.version>
    <commons-text.version>1.13.0</commons-text.version>
    <dataurl.version>2.0.0</dataurl.version>
    <gson.version>2.12.1</gson.version>
    <jsoup.version>1.18.3</jsoup.version>
    <owasp-encoder.version>1.3.1</owasp-encoder.version>
    <sisu.version>0.9.0.M3</sisu.version>

    <!-- Plugins -->
    <maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
    <maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
    <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
    <maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
    <maven-jxr-plugin.version>3.6.0</maven-jxr-plugin.version>
    <maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
    <maven-plugin-annotations.version>3.15.1</maven-plugin-annotations.version>
    <maven-plugin-plugin.version>3.15.1</maven-plugin-plugin.version>
    <maven-plugin-report-plugin.version>3.15.1</maven-plugin-report-plugin.version>
    <maven-project-info-reports-plugin.version>3.9.0</maven-project-info-reports-plugin.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
    <maven-site-plugin.version>3.21.0</maven-site-plugin.version>
    <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
    <maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>

    <git-build-hook-maven-plugin.version>3.5.0</git-build-hook-maven-plugin.version>
    <nexus-staging.version>1.7.0</nexus-staging.version>
    <central-publishing-maven-plugin.version>0.7.0</central-publishing-maven-plugin.version>
    <plexus-build-api.version>1.2.0</plexus-build-api.version>
    <plexus-classworlds.version>2.8.0</plexus-classworlds.version>
    <plexus-utils.version>4.0.2</plexus-utils.version>
    <plexus-xml.version>3.0.1</plexus-xml.version>
    <sisu-maven-plugin.version>0.3.5</sisu-maven-plugin.version>
    <site-maven-plugin.version>0.12</site-maven-plugin.version>
    <spotless.version>2.44.3</spotless.version>

    <!-- Testing -->
    <junit.version>5.12.0</junit.version>
    <slf4j.version>2.0.17</slf4j.version>
    <takari-plugin-testing.version>3.0.5</takari-plugin-testing.version>
    <assertj.version>3.27.3</assertj.version>
    <maven-embedder.version>3.9.9</maven-embedder.version>
    <maven-resolver.version>1.9.22</maven-resolver.version>
    <logback-classic.version>1.5.17</logback-classic.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>${gson.version}</version>
      </dependency>

      <dependency>
        <groupId>com.google.javascript</groupId>
        <artifactId>closure-compiler</artifactId>
        <version>${closure-compiler.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>

      <dependency>
        <groupId>eu.maxschuster</groupId>
        <artifactId>dataurl</artifactId>
        <version>${dataurl.version}</version>
      </dependency>

      <dependency>
        <groupId>io.takari.maven.plugins</groupId>
        <artifactId>takari-plugin-testing</artifactId>
        <version>${takari-plugin-testing.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>${commons-collections4.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang3.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-text</artifactId>
        <version>${commons-text.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-compat</artifactId>
        <version>${maven.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${maven.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-embedder</artifactId>
        <version>${maven-embedder.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-model</artifactId>
        <version>${maven.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${maven.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${maven-plugin-annotations.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.resolver</groupId>
        <artifactId>maven-resolver-connector-basic</artifactId>
        <version>${maven-resolver.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.resolver</groupId>
        <artifactId>maven-resolver-transport-http</artifactId>
        <version>${maven-resolver.version}</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-build-api</artifactId>
        <version>${plexus-build-api.version}</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-classworlds</artifactId>
        <version>${plexus-classworlds.version}</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>${plexus-utils.version}</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-xml</artifactId>
        <version>${plexus-xml.version}</version>
      </dependency>

      <dependency>
        <groupId>org.eclipse.sisu</groupId>
        <artifactId>org.eclipse.sisu.inject</artifactId>
        <version>${sisu.version}</version>
      </dependency>

      <dependency>
        <groupId>org.eclipse.sisu</groupId>
        <artifactId>org.eclipse.sisu.plexus</artifactId>
        <version>${sisu.version}</version>
      </dependency>

      <dependency>
        <groupId>org.jsoup</groupId>
        <artifactId>jsoup</artifactId>
        <version>${jsoup.version}</version>
      </dependency>

      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${junit.version}</version>
      </dependency>

      <dependency>
        <groupId>org.owasp.encoder</groupId>
        <artifactId>encoder</artifactId>
        <version>${owasp-encoder.version}</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!-- Test -->
    <dependency>
      <groupId>io.takari.maven.plugins</groupId>
      <artifactId>takari-plugin-testing</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.resolver</groupId>
      <artifactId>maven-resolver-connector-basic</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.resolver</groupId>
      <artifactId>maven-resolver-transport-http</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-embedder</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback-classic.version}</version>
      <scope>test</scope>
    </dependency>

    <!-- Provided -->
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Compile -->
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>com.google.javascript</groupId>
      <artifactId>closure-compiler</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>

    <dependency>
      <groupId>eu.maxschuster</groupId>
      <artifactId>dataurl</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-collections4</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
    </dependency>

    <dependency>
      <groupId>org.owasp.encoder</groupId>
      <artifactId>encoder</artifactId>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-build-api</artifactId>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
          <configuration>
            <encoding>UTF-8</encoding>
            <source>11</source>
            <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>${maven-jxr-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-report-plugin</artifactId>
          <version>${maven-plugin-report-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${maven-project-info-reports-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>${spotless.version}</version>
        <configuration>
          <upToDateChecking>
            <enabled>true</enabled>
            <indexFile>${project.basedir}/.spotless-index</indexFile>
          </upToDateChecking>
          <java>
            <includes>
              <include>src/main/java/**/*.java</include>
              <include>src/test/java/**/*.java</include>
            </includes>
            <palantirJavaFormat>
              <version>2.50.0</version>
              <style>PALANTIR</style>
              <formatJavadoc>true</formatJavadoc>
            </palantirJavaFormat>
            <importOrder/>
            <removeUnusedImports/>
            <formatAnnotations/>
          </java>
          <pom>
            <includes>
              <include>pom.xml</include>
            </includes>
            <sortPom>
              <encoding>UTF-8</encoding>
              <lineSeparator>${line.separator}</lineSeparator>
              <expandEmptyElements>false</expandEmptyElements>
              <spaceBeforeCloseEmptyElement>false</spaceBeforeCloseEmptyElement>
              <keepBlankLines>true</keepBlankLines>
              <nrOfIndentSpace>2</nrOfIndentSpace>
              <sortDependencyManagement>groupId,artifactId</sortDependencyManagement>
              <sortPlugins>groupId,artifactId</sortPlugins>
            </sortPom>
          </pom>
        </configuration>
      </plugin>

      <!-- Generate a new version of the Maven site -->
      <plugin>
        <groupId>com.github.github</groupId>
        <artifactId>site-maven-plugin</artifactId>
        <version>${site-maven-plugin.version}</version>
        <configuration>
          <message>Creating site for ${project.version}</message>
          <dryRun>true</dryRun>
          <noJekyll>true</noJekyll>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>site</goal>
            </goals>
            <phase>site</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.rudikershaw.gitbuildhook</groupId>
        <artifactId>git-build-hook-maven-plugin</artifactId>
        <version>${git-build-hook-maven-plugin.version}</version>
        <configuration>
          <installHooks>
            <pre-commit>${project.basedir}/hooks/pre-commit.sh</pre-commit>
          </installHooks>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>initialize</goal>
              <goal>install</goal>
            </goals>
            <phase>initialize</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <encoding>UTF-8</encoding>
          <release>11</release>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>${maven-enforcer-plugin.version}</version>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <dependencyConvergence>
                  <excludedScopes/>
                </dependencyConvergence>
                <requireUpperBoundDeps/>
                <requireMavenVersion>
                  <version>[3.9,)</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[11,)</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven-jar-plugin.version}</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven-plugin-plugin.version}</version>
        <executions>
          <execution>
            <id>default-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
            <phase>process-classes</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>${maven-resources-plugin.version}</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven-site-plugin.version}</version>
        <configuration>
          <locales>default</locales>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
          <!-- see: https://stackoverflow.com/questions/53010200/maven-surefire-could-not-find-forkedbooter-class -->
          <argLine>-Xmx1024m -Xms1024m -Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.eclipse.sisu</groupId>
        <artifactId>sisu-maven-plugin</artifactId>
        <version>${sisu-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>generate-index</id>
            <goals>
              <goal>main-index</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Release the deployment to the central repository -->
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>${central-publishing-maven-plugin.version}</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>sonatype</publishingServerId>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-report-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>dependencies</report>
              <report>dependency-convergence</report>
              <report>dependency-info</report>
              <report>dependency-management</report>
              <report>issue-management</report>
              <report>licenses</report>
              <report>plugin-management</report>
              <report>plugins</report>
              <report>team</report>
              <report>scm</report>
              <report>summary</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>site</id>
      <build>
        <plugins>
          <!-- Upload site to github -->
          <plugin>
            <groupId>com.github.github</groupId>
            <artifactId>site-maven-plugin</artifactId>
            <version>${site-maven-plugin.version}</version>
            <configuration>
              <message>Update site</message>
              <dryRun>false</dryRun>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>verify</phase>
              </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>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven-source-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
