<?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>net.sourceforge.cssbox</groupId>
    <artifactId>jstyleparser</artifactId>
    <version>1.13-atlassian-2</version>
    <name>jStyleparser</name>
    <description>Fork of 'jstyleparser'</description>

    <licenses>
        <license>
            <name>GNU Lesser General Public License 3.0</name>
            <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@bitbucket.org:atlassian/jstyleparser.git</connection>
        <developerConnection>scm:git:git@bitbucket.org:atlassian/jstyleparser.git</developerConnection>
        <url>https://bitbucket.org/atlassian/jstyleparser</url>
    </scm>

    <properties>
        <antlr.mvnversion>3.4</antlr.mvnversion> <!--the mvn plugin's version is in lock steps with the antlr version it uses-->
        <antlr.libversion>3.4</antlr.libversion>
        <logback.libversion>0.9.9</logback.libversion>
        <jdkLevel>1.5</jdkLevel>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.antlr</groupId>
                <artifactId>antlr3-maven-plugin</artifactId>
                <version>3.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>antlr</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!--
                   - Patch for generated class CSSLexer.java that changes it to store its 10MB DFA array in a non-static
                   - field. This allows the memory to be garbage collected when not in use.
                  -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-patch-plugin</artifactId>
                <version>1.1.1</version>
                <configuration>
                    <strip>1</strip>
                    <patchTargetDir>${project.build.directory}</patchTargetDir>
                    <patches>
                        <patch>CSSLexer-dfa-large-arrays.patch</patch>
                    </patches>
                </configuration>
                <executions>
                    <execution>
                        <id>patch</id>
                        <goals>
                            <goal>apply</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <source>${jdkLevel}</source>
                    <target>${jdkLevel}</target>
                    <showDeprecation>true</showDeprecation>
                    <compilerArgument>-Xlint:unchecked</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.2.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.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-surefire-plugin</artifactId>
                <version>2.4.3</version>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>${basedir}</directory>
                <filtering>false</filtering>
                <includes>
                    <include>COPYING.LESSER</include>
                </includes>
                <targetPath>META-INF</targetPath>
            </resource>
        </resources>

        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>*.xml</include>
                </includes>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>*.xml</exclude>
                </excludes>
            </testResource>
        </testResources>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr-runtime</artifactId>
            <version>3.4 </version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.5.10</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>0.9.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>0.9.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.nekohtml</groupId>
            <artifactId>nekohtml</artifactId>
            <version>1.9.18</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.11.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>1.4.01</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <repository>
            <id>atlassian-3rdparty</id>
            <url>https://maven.atlassian.com/3rdparty</url>
        </repository>
        <snapshotRepository>
            <id>atlassian-3rdparty-snapshot</id>
            <url>https://maven.atlassian.com/3rdparty-snapshot</url>
        </snapshotRepository>
    </distributionManagement>

</project>
