<?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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>net.shibboleth.idp.plugin.scripting</groupId>
        <artifactId>scripting</artifactId>
        <version>0.1.0</version>
    </parent>
    
    <name>Shibboleth IdP :: Plugins :: Nashorn Scripting Impl</name>
    <artifactId>idp-plugin-nashorn-impl</artifactId>
    <packaging>jar</packaging>
    
    <properties>
        <checkstyle.configLocation>${project.basedir}/../checkstyle.xml</checkstyle.configLocation>
        <automatic.module.name>net.shibboleth.idp.plugin.nashorn</automatic.module.name>
    </properties>
    
    <description>
        A project to build a Nashorn ECMAScript plugin jar.
    </description>

    <dependencies>
	<!-- All dependencies except the api and the dependencies of graal 
	     (NOT GRAAL itself) are provided and test -->
    	<dependency>
            <groupId>net.shibboleth.idp.plugin.scripting</groupId>
            <artifactId>idp-plugin-scripting-api</artifactId>
            <version>0.1.0</version>
        </dependency>

        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-admin-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>net.shibboleth.utilities</groupId>
            <artifactId>java-support</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.ext</groupId>
            <artifactId>spring-extensions</artifactId>
	    <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${spring.groupId}</groupId>
            <artifactId>spring-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>${spring.groupId}</groupId>
            <artifactId>spring-beans</artifactId>
           <scope>provided</scope>
        </dependency>

	    <dependency>
            <groupId>org.graalvm.sdk</groupId>
            <artifactId>graal-sdk</artifactId>
            <scope>provided</scope>
            <version>${graalvm.version}</version>
        </dependency>
        <dependency>
            <groupId>org.graalvm.js</groupId>
            <artifactId>js</artifactId>
            <version>${graalvm.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>${idp.groupId}</groupId>
            <artifactId>idp-admin-impl</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>install</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId> 
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Automatic-Module-Name>${automatic.module.name}</Automatic-Module-Name>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
