<?xml version="1.0"?>

<!--
  /*
  * Copyright 2001-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-->

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

  <parent>
    <groupId>com.devspan.mojo.javascript</groupId>
    <artifactId>javascript-maven-tools</artifactId>
    <version>0.9.1</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>javascript-report-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <name>Javascript Maven Report Plugin</name>
  <url>http://mojo.codehaus.org/javascript-maven-tools/javascript-report-maven-plugin/</url>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>run-its</id>
      <activation>
        <property>
          <name>skipTests</name>
          <value>!true</value>
        </property>
      </activation>      
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.3</version>
            <configuration>
              <debug>true</debug>
              <projectsDirectory>src/it</projectsDirectory>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
              <postBuildHookScript>verify</postBuildHookScript>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <goals>
                <goal>clean</goal>
                <goal>integration-test</goal>
              </goals>
              <settingsFile>src/it/settings.xml</settingsFile>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>


  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-api</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-impl</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>com.devspan.mojo.javascript</groupId>
      <artifactId>javascript-maven-archive</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>rhino</groupId>
      <artifactId>js</artifactId>
      <version>1.6R7</version>
    </dependency>

    <!-- Dependency set as "jar" and not "javascript" as this requires
         the project to register javascript-extension, not just the plugin -->
    <dependency>
      <groupId>org.jsdoctoolkit</groupId>
      <artifactId>jsdoc</artifactId>
      <version>1.4.1</version>
      <!-- <version>2.0-beta</version>  -->
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>com.jslint</groupId>
      <artifactId>jslint</artifactId>
      <version>2007-10-25</version>
      <type>jar</type>
    </dependency>


    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.2</version>
      <scope>test</scope>
    </dependency>

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

</project>
