<!--
  ~ Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 Inc. licenses this file to you 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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.wso2.carbon.privacy</groupId>
        <artifactId>forget-me</artifactId>
        <version>1.4.1</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>org.wso2.carbon.privacy.forgetme.tool</artifactId>
    <name>[GDPR] Forget Me - Tool</name>
    <packaging>jar</packaging>
    <url>http://maven.apache.org</url>

    <dependencies>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.privacy</groupId>
            <artifactId>org.wso2.carbon.privacy.forgetme.analytics.streams</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.privacy</groupId>
            <artifactId>org.wso2.carbon.privacy.forgetme.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.privacy</groupId>
            <artifactId>org.wso2.carbon.privacy.forgetme.sql</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.privacy</groupId>
            <artifactId>org.wso2.carbon.privacy.forgetme.logs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.privacy</groupId>
            <artifactId>org.wso2.carbon.privacy.forgetme.userstore</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.wso2.carbon</groupId>
                    <artifactId>javax.cache.wso2</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.wso2.orbit.org.bouncycastle</groupId>
                    <artifactId>bcprov-jdk15on</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.wso2.carbon</groupId>
                    <artifactId>org.wso2.carbon.queuing</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.axis2.wso2</groupId>
                    <artifactId>axis2</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.igniterealtime.smack.wso2</groupId>
                    <artifactId>smack</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.igniterealtime.smack.wso2</groupId>
                    <artifactId>smackx</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jaxen</groupId>
                    <artifactId>jaxen</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.wso2.orbit.commons-fileupload</groupId>
                    <artifactId>commons-fileupload</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.ant.wso2</groupId>
                    <artifactId>ant</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.equinox</groupId>
                    <artifactId>javax.servlet</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.wso2.orbit.commons-httpclient</groupId>
                    <artifactId>commons-httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.wso2.carbon</groupId>
                    <artifactId>org.wso2.carbon.registry.api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-dbcp.wso2</groupId>
                    <artifactId>commons-dbcp</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.wso2.carbon</groupId>
                    <artifactId>org.wso2.carbon.securevault</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.osgi</groupId>
                    <artifactId>org.eclipse.osgi</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.geronimo.specs.wso2</groupId>
                    <artifactId>geronimo-stax-api_1.0_spec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.woodstox</groupId>
                    <artifactId>woodstox-core-asl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.woodstox</groupId>
                    <artifactId>woodstox-core-asl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.woodstox</groupId>
                    <artifactId>stax2-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.mockito</groupId>
                    <artifactId>mockito-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.wso2.orbit.commons-collections</groupId>
                    <artifactId>commons-collections</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.log4j.wso2</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.wso2.carbon</groupId>
                    <artifactId>org.wso2.carbon.bootstrap</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>wrapper</groupId>
                    <artifactId>wrapper</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.ws.commons.axiom</groupId>
                    <artifactId>axiom-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.ws.commons.axiom</groupId>
                    <artifactId>axiom-impl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-lang.wso2</groupId>
                    <artifactId>commons-lang</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jline</groupId>
                    <artifactId>jline</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-io</groupId>
                    <artifactId>commons-io</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>appassembler-maven-plugin</artifactId>
                <configuration>
                    <assembleDirectory>target/dist</assembleDirectory>
                    <useWildcardClassPath>true</useWildcardClassPath>
                    <configurationSourceDirectory>${basedir}/../org.wso2.carbon.privacy.forgetme.conf/target/conf</configurationSourceDirectory>
                    <configurationDirectory>conf</configurationDirectory>
                    <copyConfigurationDirectory>false</copyConfigurationDirectory>
                    <repositoryLayout>flat</repositoryLayout>
                    <repositoryName>lib</repositoryName>
                    <extraJvmArguments>-Djndi.bind.off="true"</extraJvmArguments>
                    <programs>
                        <program>
                            <mainClass>org.wso2.carbon.privacy.forgetme.ForgetMeTool</mainClass>
                            <id>forgetme</id>
                        </program>
                    </programs>
                </configuration>
                <executions>
                    <execution>
                        <id>assemble</id>
                        <goals>
                            <goal>assemble</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>dist</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>${basedir}/src/main/assembly/bin.xml</descriptor>
                            </descriptors>
                            <archiverConfig>
                                <defaultDirectoryMode>0775</defaultDirectoryMode>
                                <directoryMode>0775</directoryMode>
                                <defaultFileMode>0644</defaultFileMode>
                                <fileMode>0644</fileMode>
                            </archiverConfig>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>upload-dist-zip</id>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>${project.build.directory}/${project.artifactId}-${project.version}.zip</file>
                                    <type>zip</type>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-prepare-agent-integration</id>
                        <goals>
                            <goal>prepare-agent-integration</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report-integration</id>
                        <goals>
                            <goal>report-integration</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <rule implementation="org.jacoco.maven.RuleConfiguration">
                                    <element>BUNDLE</element>
                                    <limits>
                                        <limit implementation="org.jacoco.report.check.Limit">
                                            <counter>COMPLEXITY</counter>
                                            <value>COVEREDRATIO</value>
                                            <!--<minimum>0.10</minimum>-->
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
