<?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>
        <groupId>com.codbex.kronos</groupId>
        <artifactId>kronos-resources-parent</artifactId>
        <version>0.1.3</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <name>Kronos - Resources - Neo SDK</name>
    <artifactId>kronos-resources-neo-sdk</artifactId>
    <version>0.1.3</version>
    <packaging>jar</packaging>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>META-INF/dirigible/resources-neo-sdk/sdk/tools/**</include>
                    <include>META-INF/dirigible/resources-neo-sdk/differ.sh</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven-dependency-plugin.version}</version>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.sap.cloud</groupId>
                                    <artifactId>neo-java-web-sdk</artifactId>
                                    <version>${neo-java-web-sdk.version}</version>
                                    <type>zip</type>
                                    <outputDirectory>src/main/resources/META-INF/dirigible/resources-neo-sdk/sdk</outputDirectory>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.sun.activation</groupId>
                                    <artifactId>javax.activation</artifactId>
                                    <version>${neo-java-web-sdk.javax.activation.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>src/main/resources/META-INF/dirigible/resources-neo-sdk/sdk/tools/lib/cmd</outputDirectory>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>javax.xml.bind</groupId>
                                    <artifactId>jaxb-api</artifactId>
                                    <version>${neo-java-web-sdk.jaxb.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>src/main/resources/META-INF/dirigible/resources-neo-sdk/sdk/tools/lib/cmd</outputDirectory>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.sun.xml.bind</groupId>
                                    <artifactId>jaxb-core</artifactId>
                                    <version>${neo-java-web-sdk.jaxb.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>src/main/resources/META-INF/dirigible/resources-neo-sdk/sdk/tools/lib/cmd</outputDirectory>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.sun.xml.bind</groupId>
                                    <artifactId>jaxb-impl</artifactId>
                                    <version>${neo-java-web-sdk.jaxb.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>src/main/resources/META-INF/dirigible/resources-neo-sdk/sdk/tools/lib/cmd</outputDirectory>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>${exec-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>chmod</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>chmod</executable>
                            <arguments>
                                <argument>+x</argument>
                                <argument>${project.build.directory}/classes/META-INF/dirigible/resources-neo-sdk/differ.sh</argument>
                                <argument>${project.build.directory}/classes/META-INF/dirigible/resources-neo-sdk/sdk/tools/neo.sh</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <license.header.location>../../licensing-header.txt</license.header.location>
    </properties>

</project>