<?xml version="1.0"?>
<!--
  ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
  ~ and other contributors as indicated by the @author tags.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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">
    <parent>
        <artifactId>keycloak-client-cli-parent</artifactId>
        <groupId>org.keycloak</groupId>
        <version>2.5.0.Final-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>keycloak-client-registration-cli</artifactId>
    <name>Keycloak Client Registration CLI</name>
    <description/>

    <dependencies>
        <dependency>
            <groupId>org.jboss.aesh</groupId>
            <artifactId>aesh</artifactId>
        </dependency>
        <dependency>
            <groupId>org.keycloak</groupId>
            <artifactId>keycloak-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <!--version>2.4.3</version-->
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <filters>
                                <filter>
                                    <artifact>org.keycloak:keycloak-core</artifact>
                                    <includes>
                                        <include>org/keycloak/util/**</include>
                                        <include>org/keycloak/json/**</include>
                                        <include>org/keycloak/jose/jws/**</include>
                                        <include>org/keycloak/jose/jwk/**</include>
                                        <include>org/keycloak/representations/adapters/config/**</include>
                                        <include>org/keycloak/representations/AccessTokenResponse.class</include>
                                        <include>org/keycloak/representations/idm/ClientRepresentation.class</include>
                                        <include>org/keycloak/representations/idm/ProtocolMapperRepresentation.class</include>
                                        <include>org/keycloak/representations/oidc/OIDCClientRepresentation.class</include>
                                        <include>org/keycloak/representations/idm/authorization/**</include>
                                        <include>org/keycloak/representations/JsonWebToken.class</include>
                                    </includes>
                                </filter>
                                <filter>
                                    <artifact>org.keycloak:keycloak-common</artifact>
                                    <includes>
                                        <include>org/keycloak/common/util/**</include>
                                    </includes>
                                </filter>
                                <filter>
                                    <artifact>org.bouncycastle:bcprov-jdk15on</artifact>
                                    <includes>
                                        <include>**/**</include>
                                    </includes>
                                </filter>
                                <filter>
                                    <artifact>org.bouncycastle:bcpkix-jdk15on</artifact>
                                    <excludes>
                                        <exclude>**/**</exclude>
                                    </excludes>
                                </filter>
                                <filter>
                                    <artifact>com.fasterxml.jackson.core:jackson-core</artifact>
                                    <includes>
                                        <include>**/**</include>
                                    </includes>
                                </filter>
                                <filter>
                                    <artifact>com.fasterxml.jackson.core:jackson-databind</artifact>
                                    <includes>
                                        <include>**/**</include>
                                    </includes>
                                </filter>
                                <filter>
                                    <artifact>com.fasterxml.jackson.core:jackson-annotations</artifact>
                                    <includes>
                                        <include>com/fasterxml/jackson/annotation/**</include>
                                    </includes>
                                </filter>

                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
