<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.codelibs</groupId>
  <artifactId>yuicompressor</artifactId>
  <version>2.4.10</version>
  <packaging>jar</packaging>

  <name>YUI Compressor</name>
  <description>
    The YUI Compressor is a JavaScript compressor which, in addition to removing
    comments and white-spaces, obfuscates local variables using the smallest
    possible variable name. This obfuscation is safe, even when using constructs
    such as 'eval' or 'with' (although the compression is not optimal is those
    cases) Compared to jsmin, the average savings is around 20%.
  </description>
  <url>https://github.com/codelibs/yuicompressor</url>

  <licenses>
    <license>
      <name>BSD License</name>
      <url>https://raw.githubusercontent.com/codelibs/yuicompressor/refs/heads/main/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:codelibs/yuicompressor.git</connection>
    <url>scm:git:git@github.com:codelibs/yuicompressor.git</url>
    <developerConnection>scm:git:git@github.com:codelibs/yuicompressor.git</developerConnection>
    <tag>yuicompressor-2.4.10</tag>
  </scm>

  <organization>
    <name>CodeLibs Project</name>
    <url>https://www.codelibs.org/</url>
  </organization>

  <developers>
    <developer>
      <id>shinsuke</id>
      <name>Shinsuke Sugaya</name>
      <email>shinsuke.sugaya@codelibs.co</email>
      <organization>CodeLibs Inc.</organization>
      <organizationUrl>https://codelibs.co</organizationUrl>
    </developer>
  </developers>

  <contributors>
    <contributor>
      <name>Julien Lecomte</name>
    </contributor>
    <contributor>
      <name>Isaac Z. Schlueter</name>
    </contributor>
  </contributors>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.release>11</maven.compiler.release>
  </properties>

  <dependencies>
    <!-- Command line argument parser -->
    <dependency>
      <groupId>args4j</groupId>
      <artifactId>args4j</artifactId>
      <version>2.37</version>
    </dependency>

    <!-- Mozilla Rhino JavaScript engine - upgraded to latest version -->
    <!-- Version 1.8.0 (2024) with modern AST API -->
    <dependency>
      <groupId>org.mozilla</groupId>
      <artifactId>rhino</artifactId>
      <version>1.8.0</version>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- Compiler plugin for Java 11+ -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.11.0</version>
        <configuration>
          <source>11</source>
          <target>11</target>
          <release>11</release>
          <encoding>UTF-8</encoding>
          <showDeprecation>false</showDeprecation>
          <debug>true</debug>
        </configuration>
      </plugin>

      <!-- Surefire plugin for running tests -->
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.2</version>
        <configuration>
          <includes>
            <include>**/*Test.java</include>
            <include>**/Test*.java</include>
          </includes>
        </configuration>
      </plugin>

      <!-- Shade plugin to create fat JAR with dependencies -->
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>com.yahoo.platform.yui.compressor.Bootstrap</mainClass>
                </transformer>
              </transformers>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
              <createDependencyReducedPom>false</createDependencyReducedPom>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- JAR plugin configuration -->
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <archive>
            <manifest>
              <mainClass>com.yahoo.platform.yui.compressor.Bootstrap</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <!-- Javadoc plugin for Maven Central -->
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.11.2</version>
        <configuration>
          <source>11</source>
          <encoding>UTF-8</encoding>
          <docencoding>UTF-8</docencoding>
          <charset>UTF-8</charset>
          <doclint>none</doclint>
        </configuration>
      </plugin>

      <!-- GPG plugin for signing artifacts -->
      <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>

      <!-- Central Publishing 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>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
