<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>
    <name>Google Soy compiler</name>
    <groupId>com.google.template.soy</groupId>
    <artifactId>soycompiler</artifactId>
    <version>20140422.18-atlassian3</version>
    <packaging>jar</packaging>

    <properties>
        <args4j.version>2.0.17</args4j.version>
        <ant.version>1.7.0</ant.version>
        <guava.version>18.0</guava.version>
        <guice.version>3.0</guice.version>
        <icu4j.version>51.1</icu4j.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>Copyright 2009 Google Inc</comments>
        </license>
    </licenses>
    <scm>
      <connection>scm:git:ssh://git@bitbucket.org/atlassian/closure-templates.git</connection>
      <developerConnection>scm:git:ssh://git@bitbucket.org/atlassian/closure-templates.git</developerConnection>
      <url>https://bitbucket.org/atlassian/closure-templates</url>
    </scm>


    <build>
        <sourceDirectory>java/src</sourceDirectory>


        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <configuration>
                            <target>
                                <ant target="generated-soyutils">
                                </ant>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>add-resource</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>build/genfiles</source>
                            </sources>
                            <resources>
                                <resource>
                                    <directory>build/javascript</directory>
                                    <targetPath>js</targetPath>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>build</directory>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>1.3.9</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>${ant.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>${guice.version}</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.google.inject.extensions</groupId>
            <artifactId>guice-assistedinject</artifactId>
            <version>${guice.version}</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.google.inject.extensions</groupId>
            <artifactId>guice-multibindings</artifactId>
            <version>${guice.version}</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.ibm.icu</groupId>
            <artifactId>icu4j</artifactId>
            <version>${icu4j.version}</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>args4j</groupId>
            <artifactId>args4j</artifactId>
            <version>${args4j.version}</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <profiles>
        <!-- This fixes up the classpath for ant as java.home is set to the JRE_HOME -->
        <profile>
            <id>tools.jar</id>
            <activation>
                <file>
                    <exists>${java.home}/../lib/tools.jar</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <dependencies>
                            <dependency>
                                <groupId>com.sun</groupId>
                                <artifactId>tools</artifactId>
                                <version>1.7.0</version>
                                <scope>system</scope>
                                <systemPath>${java.home}/../lib/tools.jar</systemPath>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <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>

