<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  ~
  ~ Copyright (c) 2011-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]"
  -->
<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>openidm-ui</artifactId>
        <groupId>org.openidentityplatform.openidm</groupId>
        <version>7.0.2</version>
    </parent>

    <artifactId>openidm-ui-admin</artifactId>
    <name>OpenIDM UI Admin</name>
    <packaging>bundle</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.openidentityplatform.commons.ui</groupId>
            <artifactId>user</artifactId>
            <type>zip</type>
            <classifier>www</classifier>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openidm</groupId>
            <artifactId>openidm-ui-common</artifactId>
            <version>${project.version}</version>
            <type>zip</type>
            <classifier>www</classifier>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>backgrid.min</artifactId>
            <version>0.3.5</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>
        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>backgrid-paginator.min</artifactId>
            <version>0.3.5</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>
        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>backgrid-filter.min</artifactId>
            <version>0.3.7</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>
        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>backgrid-filter.min</artifactId>
            <version>0.3.7</version>
            <type>css</type>
        </dependency>
        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>backbone-relational</artifactId>
            <version>0.9.0</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>jsoneditor</artifactId>
            <version>0.7.9</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>ldapjs-filter</artifactId>
            <version>2253</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>jquery-cron</artifactId>
            <version>f831f2</version>
            <type>js</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>form2js</artifactId>
            <version>2.0-769718a</version>
            <type>js</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>CodeMirror</artifactId>
            <version>4.10</version>
            <type>zip</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>bootstrap-tabdrop</artifactId>
            <version>1.0</version>
            <type>js</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>d3</artifactId>
            <version>3.5.5</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>dimple</artifactId>
            <version>2.1.2</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>fontawesome-iconpicker</artifactId>
            <version>1.0.0</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>fontawesome-iconpicker</artifactId>
            <version>1.0.0</version>
            <classifier>min</classifier>
            <type>css</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>dragula</artifactId>
            <version>3.6.7</version>
            <classifier>min</classifier>
            <type>css</type>
        </dependency>
        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>bootstrap-datetimepicker</artifactId>
            <version>4.14.30</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>
        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>bootstrap-datetimepicker</artifactId>
            <version>4.14.30</version>
            <classifier>min</classifier>
            <type>css</type>
        </dependency>

        <dependency>
          <groupId>org.apache.servicemix.bundles</groupId>
          <artifactId>org.apache.servicemix.bundles.rhino</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>less</artifactId>
            <version>1.5.1</version>
            <classifier>rhino</classifier>
            <type>js</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>r</artifactId>
            <version>2.1.10</version>
            <type>js</type>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>moment-timezone-with-data</artifactId>
            <version>0.5.4</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>
        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>sifter</artifactId>
            <version>0.4.1</version>
            <classifier>min</classifier>
            <type>js</type>
        </dependency>
        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>microplugin</artifactId>
            <version>0.0.3</version>
            <type>js</type>
        </dependency>
        <dependency>
            <groupId>org.openidentityplatform.commons.ui.libs</groupId>
            <artifactId>handlebars</artifactId>
            <version>4.0.5</version>
            <type>js</type>
        </dependency>
    </dependencies>

    <build>

        <resources>
            <resource>
                <directory>${basedir}/src/main/js</directory>
            </resource>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
            <resource>
		        <directory>${basedir}/../..</directory>
		        <filtering>true</filtering>
		        <includes>
		        		<include>logo.png</include>
		        	</includes>
		        	<targetPath>${project.build.directory}/compose/images</targetPath>
		     </resource>
        </resources>

        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.openidentityplatform.commons.ui</groupId>
                                    <artifactId>user</artifactId>
                                    <type>zip</type>
                                    <classifier>www</classifier>
                                </artifactItem>

                                <artifactItem>
                                    <groupId>org.openidentityplatform.openidm</groupId>
                                    <artifactId>openidm-ui-common</artifactId>
                                    <version>${project.version}</version>
                                    <type>zip</type>
                                    <classifier>www</classifier>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>

                    <execution>
                        <id>unpack-codemirror</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.openidentityplatform.commons.ui.libs</groupId>
                                    <artifactId>CodeMirror</artifactId>
                                    <type>zip</type>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>

                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>prepare-working-dir</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <finalName>dependencies</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/assembly/dir.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <executions>
                    <execution>
                    <id>bundle-manifest</id>
                    <phase>package</phase>
                    <goals>
                        <goal>manifest</goal>
                    </goals>
                    </execution>
                </executions>
                <configuration>
                    <instructions>
                        <Import-Package>*</Import-Package>
                        <Include-Resource>
                            default=target/www
                        </Include-Resource>
                    </instructions>
                </configuration>
            </plugin>

        </plugins>
    </build>

</project>
