<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>net.sf.docbook</groupId>
  <artifactId>docbook-xsl-webhelpindexer</artifactId>
  <name>DocBook XSL WebHelp Indexer extension</name>
  <packaging>jar</packaging>
  <version>1.0.0-9777</version>
  <description>DocBook XSL WebHelp Indexer extension
  </description>
  <url>http://sourceforge.net/projects/docbook/</url>

  <parent>
    <groupId>net.sf.docbook</groupId>
    <artifactId>docbook</artifactId>
    <version>5.0-2</version>
  </parent>


  <properties>
    <docbook.xsl.webhelpindexer.release>docbook-code-9777-trunk</docbook.xsl.webhelpindexer.release>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-core</artifactId>
      <version>3.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-analyzers</artifactId>
      <version>3.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.ccil.cowan.tagsoup</groupId>
      <artifactId>tagsoup</artifactId>
      <version>1.2.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
      <version>1.7.0</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>wagon-maven-plugin</artifactId>
        <version>1.0-beta-3</version>
        <executions>
          <execution>
            <id>download-xsl-webhelpindexer</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>download-single</goal>
            </goals>
            <configuration>
              <url>http://sourceforge.net/code-snapshots/svn/d/do/docbook/code/</url>
              <fromFile>${docbook.xsl.webhelpindexer.release}.zip</fromFile>
              <toFile>${project.build.directory}/lib/webhelpindexer.zip</toFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <echo>Extracting docbook xsl webhelpindexer sources webhelpindexer.tgz.</echo>
                <mkdir dir="${project.build.directory}/tmp"/>

                <unzip src="${project.build.directory}/lib/webhelpindexer.zip" dest="${project.build.directory}/tmp/"/>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/tmp/${docbook.xsl.webhelpindexer.release}/xsl-webhelpindexer/src/</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8.1</version>
        <configuration>
          <sourcepath>${project.build.directory}/tmp/${docbook.xsl.webhelpindexer.release}/xsl-webhelpindexer/src/</sourcepath>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
