<?xml version="1.0" encoding="UTF-8"?>
<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>
        <artifactId>frontend-plugins</artifactId>
        <groupId>com.github.eirslett</groupId>
        <version>0.0.9</version>
    </parent>

    <artifactId>frontend-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>

    <name>Maven Frontend Plugin</name>

    <description>
        This Maven plugin lets you install Node/NPM locally
        for your project, install dependencies with NPM,
        run Grunt tasks, and/or run Karma tests.
    </description>

    <dependencies>
        <dependency>
            <groupId>com.github.eirslett</groupId>
            <artifactId>frontend-plugin-core</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                        <configuration>
                            <goalPrefix>frontend</goalPrefix>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- For the integration test -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
                <version>1.8</version>

                <configuration>
                    <projectsDirectory>src/it</projectsDirectory>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <settingsFile>src/it/settings.xml</settingsFile>
                    <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                    <streamLogs>true</streamLogs>
                </configuration>

                <executions>
                    <execution>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>install</goal>
                            <goal>run</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
