<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">
  <parent>
    <groupId>com.google.common.html.types</groupId>
    <artifactId>parent</artifactId>
    <version>1.0.5</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <name>Safe HTML Types Library</name>
  <artifactId>types</artifactId>
  <packaging>jar</packaging>
  <description>
    Wrapper types for web content strings.

    These strings must meet a contract that enable web
    applications to be secure-by-construction against
    important classes of vulnerabilities like XSS.

    This is meant to be used in conjunction with the
    error_prone checker, and safe template languages.

    https://github.com/google/safe-html-types/blob/master/README.md
  </description>

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

    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
      <version>3.0.0</version>
    </dependency>

    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <version>${gwt.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>jsr250-api</artifactId>
      <version>1.0</version>
    </dependency>

    <dependency>
      <groupId>com.google.errorprone</groupId>
      <artifactId>error_prone_annotations</artifactId>
      <version>2.0.2</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>[4.11,)</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava-testlib</artifactId>
      <!-- Same as guava or else we get convergence errors. -->
      <version>${guava.version}</version>
    </dependency>
  </dependencies>

  <build>
    <defaultGoal>package</defaultGoal>

    <plugins>
      <plugin>
        <artifactId>exec-maven-plugin</artifactId>
        <groupId>org.codehaus.mojo</groupId>
        <version>1.4.0</version>
        <executions>
          <execution>
            <id>Generate fences.xml</id>
            <!--
                We want to run this after the classes are available to examine.
            -->
            <phase>process-classes</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <workingDirectory>${project.basedir}</workingDirectory>
              <executable>src/main/scripts/make_fences_xml.sh</executable>
              <arguments>
                <argument>${project.build.outputDirectory}</argument>
              </arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.comoyo.maven.plugins</groupId>
        <artifactId>protoc-bundled-plugin</artifactId>
        <configuration>
          <inputDirectories>
            <inputDirectory>${project.parent.basedir}/proto/src/main/protobuf</inputDirectory>
          </inputDirectories>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- recognize the generated *Proto.java files as sources -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-sources/protobuf</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <!-- Seal the JAR so that package private access cannot
                   be violated by other projects. -->
              <Sealed>true</Sealed>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <notimestamp>true</notimestamp>
          <windowtitle>Safe HTML Types</windowtitle>
          <author>false</author>
          <doctitle>
            <![CDATA[
                  <h1>Safe HTML Types</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; 2015 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>
          <additionalparam>-Xdoclint:none</additionalparam>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
