<!--
 Copyright 2011 Google Inc.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<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.padler</groupId>
  <artifactId>closure-stylesheets</artifactId>
  <packaging>jar</packaging>

  <name>Closure Stylesheets</name>
  <version>1.6.0</version>

  <url>http://github.com/google/closure-stylesheets/</url>
  <description>
    Closure Stylesheets is an extension to CSS that adds variables, functions,
    conditionals, and mixins to standard CSS. The tool also supports
    minification, linting, RTL flipping, and CSS class renaming.
  </description>
  <inceptionYear>2011</inceptionYear>

  <scm>
    <connection>scm:git:https://github.com/google/closure-stylesheets.git</connection>
    <developerConnection>scm:git:git@github.com:google/closure-stylesheets.git</developerConnection>
    <url>https://github.com/google/closure-stylesheets.git</url>
    <tag>HEAD</tag>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/google/closure-stylesheets/issues</url>
  </issueManagement>

  <!-- Allow publishing snapshots to Maven Central. -->
  <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>

  <organization>
    <name>Google</name>
    <url>http://www.google.com</url>
  </organization>

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

  <developers>
    <developer>
      <name>Googlers</name>
      <organization>Google</organization>
      <organizationUrl>https://www.google.com</organizationUrl>
    </developer>
  </developers>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.7</java.version>
    <guava.version>20.0</guava.version>
  </properties>

  <build>
    <defaultGoal>install</defaultGoal>

    <sourceDirectory>${project.basedir}/src</sourceDirectory>
    <testSourceDirectory>${project.basedir}/tests</testSourceDirectory>
    <testResources>
      <testResource>
        <directory>${project.basedir}/tests</directory>
      </testResource>
    </testResources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <debug>true</debug>
          <debuglevel>lines,vars,source</debuglevel>
          <compilerArgument>-Werror</compilerArgument>
          <compilerArgument>-Xlint:deprecation</compilerArgument>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.helger.maven</groupId>
        <artifactId>ph-javacc-maven-plugin</artifactId>
        <version>2.8.0</version>
        <executions>
          <execution>
            <id>jjc1</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>javacc</goal>
            </goals>
            <configuration>
              <jdkVersion>${java.version}</jdkVersion>
              <javadocFriendlyComments>true</javadocFriendlyComments>
              <sourceDirectory>${project.basedir}/src</sourceDirectory>
              <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <archive>
            <manifest>
              <mainClass>com.google.common.css.compiler.commandline.ClosureCommandLineCompiler</mainClass>
            </manifest>
          </archive>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>args4j</groupId>
      <artifactId>args4j</artifactId>
      <version>2.33</version>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>

    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.8.6</version>
    </dependency>

    <dependency>
      <groupId>javacc</groupId>
      <artifactId>javacc</artifactId>
      <version>4.1</version>
    </dependency>

    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.2</version>
    </dependency>

    <dependency>  <!-- For com.google.debugging.sourcemap -->
      <groupId>com.google.javascript</groupId>
      <artifactId>closure-compiler-unshaded</artifactId>
      <version>v20200927</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.10.19</version>
    </dependency>

    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <version>0.36</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <profiles>
    <!-- Build steps that only need to run when publishing to Maven Central. -->
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <!-- Sign artifacts with local GPG key. -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <keyname>D8D6C4FA</keyname>
                  <passphrase>k7P8xctR3C29eM78K9vjNhFLjWhgS28q</passphrase>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <!-- Create javadoc.jar. -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.3</version>
            <configuration>
              <notimestamp>true</notimestamp>
              <windowtitle>Closure Stylesheets</windowtitle>
              <author>false</author>
              <doctitle>
                <![CDATA[
                  <h1>Closure Stylesheets</h1>
                ]]>
              </doctitle>
              <bottom>
                <![CDATA[
                  <div id="footer">
                  <div id="footerlogo" style="float:left">
                    <img src="http://www.google.com/images/art.gif" alt="Google colored balls">
                  </div>
                  <div id="copyright" style="float:left">
                    <p>&copy; 2016 Google -
                      <a href="http://www.google.com/privacy.html">Privacy Policy</a> -
                      <a href="http://www.google.com/terms_of_service.html" >Terms and Conditions</a> -
                      <a href="http://www.google.com/about.html">About Google</a>
                    </p>
                  </div>
                ]]>
              </bottom>
              <!-- Ignore javadoc errors. -->
              <failOnError>false</failOnError>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadoc</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <!-- Create sources.jar. -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.4</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
