<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ 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>
        <groupId>org.openid4java</groupId>
        <artifactId>openid4java-nodeps-parent</artifactId>
        <version>0.9.6-wso2v5</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <!--
      - This pom is only for `mvn eclipse:eclipse',
      - for complete structure, see directory maven2/.
      -->
    <modelVersion>4.0.0</modelVersion>
    <artifactId>openid4java-nodeps</artifactId>
    <packaging>jar</packaging>
    <version>0.9.6-wso2v5</version>
    <name>OpenID4Java no dependencies</name>

    <properties>
        <encoding>UTF-8</encoding>
        <jetty.version>6.0.2</jetty.version>
        <test.data.src>${test.data}</test.data.src>
        <test.data.build>${basedir}/target/test-data</test.data.build>
    </properties>

    <build>

        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>2.1</version>
            </extension>
        </extensions>

        <sourceDirectory>${basedir}/src</sourceDirectory>
        <resources>
            <resource>
                <directory>${basedir}/src</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xsd</include>
                </includes>
            </resource>
        </resources>
        <testSourceDirectory>${basedir}/test/src</testSourceDirectory>
        <testResources>
            <testResource>
                <directory>${basedir}/test/src</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.html</include>
                </includes>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${jvm.ver}</source>
                    <target>${jvm.ver}</target>
                    <debug>true</debug>
                    <optimize>true</optimize>
                </configuration>
            </plugin>
            <!-- http://mojo.codehaus.org/properties-maven-plugin/ -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>properties-maven-plugin</artifactId>
                <version>1.0-alpha-2</version>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>read-project-properties</goal>
                        </goals>
                        <configuration>
                            <files>
                                <file>project.properties</file>
                            </files>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- clean coverage data before collecting -->
            <plugin>
                <artifactId>cobertura-maven-plugin</artifactId>
                <groupId>org.codehaus.mojo</groupId>
                <version>2.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-test-resources</phase>
                        <configuration>
                            <tasks unless="maven.test.skip">
                                <echo message="To skip me, just call mvn -Dmaven.test.skip=true" />
                                <delete dir="${test.data.build}" />
                                <copy todir="${test.data.build}">
                                    <fileset dir="${test.data.src}" />
                                </copy>
                                <replace token="SERVLET_PORT" value="${test.servlet.port}" dir="${test.data.build}" />
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <property>
                            <name>YADIS_TEST_DATA</name>
                            <value>${test.data.build}</value>
                        </property>
                        <property>
                            <name>SERVLET_PORT</name>
                            <value>${test.servlet.port}</value>
                        </property>
                        <property>
                            <name>TEST_DATA</name>
                            <value>${basedir}/test/src/org/openid4java/</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <outputDirectory>${basedir}/maven2/target/site/${project.artifactId}/</outputDirectory>
        <plugins>
            <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <minmemory>128m</minmemory>
                    <maxmemory>512m</maxmemory>
                    <encoding>${encoding}</encoding>
                    <docencoding>${encoding}</docencoding>
                    <charset>${encoding}</charset>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-jxr-plugin</artifactId>
                <configuration>
                    <inputEncoding>${encoding}</inputEncoding>
                    <outputEncoding>${encoding}</outputEncoding>
                    <linkJavadoc>true</linkJavadoc>
                    <javadocDir>apidocs</javadocDir>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <configuration>
                    <tags>
                        <tag>TODO</tag>
                        <tag>FIXME</tag>
                        <tag>@todo</tag>
                        <tag>@deprecated</tag>
                    </tags>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <!-- version 2.1 is bugged ouput coverage 100% or 0% -->
                <version>2.0</version>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <configuration>
                    <showSuccess>false</showSuccess>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report-only</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <configLocation>${basedir}/openid4java_checks.xml</configLocation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-pmd-plugin</artifactId>
                <configuration>
                    <linkXref>true</linkXref>
                    <sourceEncoding>${encoding}</sourceEncoding>
                    <minimumTokens>100</minimumTokens>
                    <targetJdk>${jvm.ver}</targetJdk>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>pmd</report>
                            <report>cpd</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>rat-maven-plugin</artifactId>
                <version>1.0-alpha-3</version>
            </plugin>
        </plugins>
    </reporting>

    <dependencies>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.nekohtml</groupId>
            <artifactId>nekohtml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openxri</groupId>
            <artifactId>openxri-syntax</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.openxri</groupId>
            <artifactId>openxri-client</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.google.code.guice</groupId>
            <artifactId>guice</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache</artifactId>
        </dependency>

        <!-- higgins -->
        <!-- Resolve this basedir dependencies before upload to ibiblio. -->
        <dependency>
            <groupId>org.eclipse.higgins</groupId>
            <artifactId>higgins-configuration-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.higgins</groupId>
            <artifactId>higgins-sts-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.higgins</groupId>
            <artifactId>higgins-sts-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.higgins</groupId>
            <artifactId>higgins-sts-server-token-handler</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.higgins</groupId>
            <artifactId>higgins-sts-spi</artifactId>
        </dependency>

        <!-- Discovery -->
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
        </dependency>
        <dependency>
            <groupId>xml-security</groupId>
            <artifactId>xmlsec</artifactId>
        </dependency>

        <!-- Infocard -->
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-api</artifactId>
        </dependency>

        <!-- JdbcServerAssociationStore -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </dependency>

        <!-- Sample Consumer -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>jdom</groupId>
            <artifactId>jdom</artifactId>
        </dependency>
        <dependency>
            <groupId>jetty</groupId>
            <artifactId>jetty</artifactId>
        </dependency>
        <dependency>
            <groupId>jetty</groupId>
            <artifactId>jetty-util</artifactId>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.jwebunit</groupId>
            <artifactId>jwebunit-htmlunit-plugin</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>nekohtml</groupId>
                    <artifactId>nekohtml</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

</project>
