<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ DO NOT REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  ~
  ~ Copyright (c) 2012-2015 ForgeRock AS. All rights reserved.
  ~
  ~ The contents of this file are subject to the terms
  ~ of the Common Development and Distribution License
  ~ (the License). You may not use this file except in
  ~ compliance with the License.
  ~
  ~ You can obtain a copy of the License at
  ~ http://forgerock.org/license/CDDLv1.0.html
  ~ See the License for the specific language governing
  ~ permission and limitations under the License.
  ~
  ~ When distributing Covered Code, include this CDDL
  ~ Header Notice in each file and include the License file
  ~ at http://forgerock.org/license/CDDLv1.0.html
  ~ If applicable, add the following below the CDDL Header,
  ~ with the fields enclosed by brackets [] replaced by
  ~ your own identifying information:
  ~ "Portions Copyrighted [year] [name of copyright owner]"
  ~
  ~  Portions Copyrighted 2018-2025 3A Systems, LLC
  -->
<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.openidentityplatform.commons</groupId>
	    <artifactId>parent</artifactId>
	    <version>3.1.1</version>
	  </parent>
    <groupId>org.openidentityplatform.commons</groupId>
    <artifactId>script</artifactId>
    <packaging>pom</packaging>
    <name>${project.groupId}.${project.artifactId}</name>
    <description>The Script libraries supports a common implementation of various scripting languages to use the JSON
        Resource core library
    </description>
    <inceptionYear>2012</inceptionYear>
    <properties>
        <!-- Documentation and site properties -->
        <siteDistributionURL>scp://community.internal.forgerock.com/var/www/vhosts/commons.forgerock.org/httpdocs/forgerock-script
        </siteDistributionURL>

        <!--<commons.script.osgi.import.default.version>-->
        <!--[$(version;==;$(@)),$(version;+;$(@)))-->
        <!--</commons.script.osgi.import.default.version>-->

        <commons.script.osgi.import.before.defaults />
        <commons.script.osgi.import.defaults />
        <commons.script.osgi.import.additional />
        <commons.script.osgi.import>
            org.forgerock.script*;provide:=true,
            org.forgerock.json.resource*,
            ${commons.script.osgi.import.before.defaults},
            ${commons.script.osgi.import.defaults},
            ${commons.script.osgi.import.additional},
            *
        </commons.script.osgi.import>
    </properties>

    <modules>
        <module>common</module>
        <module>javascript</module>
        <module>groovy</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <!--
                mvn versions:display-plugin-updates
                mvn versions:display-dependency-updates
                mvn versions:use-latest-versions
            -->
            <!-- Provided Dependencies -->
            <!-- Core OSGi -->
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>4.3.1</version>
                <scope>provided</scope>
            </dependency>

            <!-- Test Dependencies -->
            <dependency>
                <groupId>org.easytesting</groupId>
                <artifactId>fest-assert-core</artifactId>
                <version>2.0M10</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build><finalName>${project.groupId}.${project.artifactId}</finalName>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>5.1.9</version>
                    <configuration>
                        <instructions>
                            <Import-Package>${commons.script.osgi.import}</Import-Package>
                            <_removeheaders>
                                Bnd-LastModified,Built-By,Private-Package,Tool,Build-Jdk,Include-Resource,Ignore-Package,Private-Package,Bundle-DocURL
                            </_removeheaders>
                        </instructions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-descriptor</id>
                            <goals>
                                <goal>attach-descriptor</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <windowTitle>Open Identity Platform CommunityCommon Script ${project.version} Reference</windowTitle>
                    <linkJavadoc>true</linkJavadoc>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>default</id>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                    <reportSet>
                        <id>aggregate</id>
                        <reports>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>jrebel</id>
            <build><finalName>${project.groupId}.${project.artifactId}</finalName>
                <plugins>
                    <plugin>
                        <groupId>org.zeroturnaround</groupId>
                        <artifactId>jrebel-maven-plugin</artifactId>
                        <version>1.1.3</version>
                        <configuration>
                            <packaging>jar</packaging>
                        </configuration>
                        <executions>
                            <execution>
                                <id>generate-rebel-xml</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>maven-bundle-plugin</artifactId>
                        <configuration>
                            <instructions>
                                <Include-Resource>{maven-resources},target/classes/rebel.xml</Include-Resource>
                            </instructions>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
