<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>
  <parent>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>webstart</artifactId>
    <version>1.0-beta-6</version>
  </parent>

  <artifactId>webstart-maven-plugin</artifactId>
  <version>1.0-beta-6</version>
  <packaging>maven-plugin</packaging>
  <name>MWEBSTART :: Webstart Maven Plugin</name>
  <description>Maven plugin that supports webstart application development. Helps generate JNLP files and supports the
    JnlpDownloadServlet.
  </description>

  <prerequisites>
    <maven>${mavenVersion}</maven>
  </prerequisites>

  <contributors>
    <contributor>
      <name>David Boden</name>
      <email>dave@daveboden.com</email>
    </contributor>
    <contributor>
      <name>Kevin Stembridge</name>
      <email>kevin.stembridge.dev@gmail.com</email>
      <timezone>0</timezone>
    </contributor>
    <contributor>
      <name>Claude Humard</name>
      <email>NOTSHOWN@nospam.com</email>
    </contributor>
  </contributors>


  <dependencies>

    <dependency>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>webstart-pack200-api</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-settings</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
    </dependency>

    <!-- dependencies to plexus annotations -->
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-component-annotations</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-impl</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-shared-utils</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-jarsigner</artifactId>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-archiver</artifactId>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-container-default</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>xmlunit</groupId>
      <artifactId>xmlunit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>webstart-jnlp-servlet</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- for JarUnsign... -->
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-embedder</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <properties>
    <javadocPluginVersion>2.7</javadocPluginVersion>

    <!-- versions of javadoc tagglets -->
    <mavenPluginToolsJavadocVersion>2.5.1</mavenPluginToolsJavadocVersion>
    <plexusComponentJavadocVersion>1.3.0</plexusComponentJavadocVersion>
  </properties>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
      </plugin>

      <!-- expose new plexus components -->
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate-metadata</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>site</id>
            <phase>pre-site</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <copy todir="${project.build.directory}/site/examples/">
                  <fileset dir="${basedir}/src/main/resources">
                    <include name="**/*.vm" />
                  </fileset>
                  <mapper type="flatten" />
                </copy>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${javadocPluginVersion}</version>
          <configuration>
            <charset>${project.reporting.outputEncoding}</charset>
            <links>
              <link>http://download.oracle.com/javase/6/docs/api</link>
            </links>
            <tagletArtifacts>
              <tagletArtifact>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-tools-javadoc</artifactId>
                <version>${mavenPluginToolsJavadocVersion}</version>
              </tagletArtifact>
              <tagletArtifact>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-javadoc</artifactId>
                <version>${plexusComponentJavadocVersion}</version>
              </tagletArtifact>
            </tagletArtifacts>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>jdk17</id>
      <activation>
        <jdk>1.7</jdk>
      </activation>
      <dependencies>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>webstart-pack200-impl</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>keytool-api-1.7</artifactId>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>jdk16</id>
      <activation>
        <jdk>1.6</jdk>
      </activation>
      <dependencies>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>webstart-pack200-impl</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>keytool-api-1.6</artifactId>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>jdk15</id>
      <activation>
        <jdk>1.5</jdk>
      </activation>
      <dependencies>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>webstart-pack200-impl</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>keytool-api-1.5</artifactId>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>run-its</id>
      <activation>
        <property>
          <name>maven.test.skip</name>
          <value>!true</value>
        </property>
      </activation>
      <build>
        <defaultGoal>verify</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <settingsFile>src/it/settings.xml</settingsFile>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <postBuildHookScript>validate.groovy</postBuildHookScript>
              <addTestClassPath>true</addTestClassPath>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>reporting</id>
      <activation>
        <property>
          <name>skipReports</name>
          <value>!true</value>
        </property>
      </activation>

      <reporting>
        <plugins>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-plugin-plugin</artifactId>
            <version>${mavenPluginPluginVersion}</version>
          </plugin>

          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.5</version>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>l10n-maven-plugin</artifactId>
            <version>1.0-alpha-2</version>
            <configuration>
              <locales>
                <locale>fr</locale>
              </locales>
            </configuration>
          </plugin>
        </plugins>
      </reporting>
    </profile>
  </profiles>

</project>
