<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <!-- <groupId>com.wacai.loan</groupId> -->
  <!-- <artifactId>cas-dev</artifactId> -->

  <groupId>org.jasig.cas</groupId>
  <artifactId>cas-server</artifactId>
  <version>3.5.2-SNAPSHOT</version>

  <packaging>pom</packaging>
  <name>Jasig Central Authentication Service</name>
  <description>Jasig CAS SSO server libraries and Web application.</description>
  <url>http://www.jasig.org/cas/</url>
  <inceptionYear>2004</inceptionYear>

  <parent>
    <groupId>org.jasig.parent</groupId>
    <artifactId>jasig-parent</artifactId>
    <version>34</version>
  </parent>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>${basedir}/src/test/resources</directory>
      </testResource>
    </testResources>
    
    <pluginManagement>
      <plugins>
      	<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12</version>
        <configuration>
          <forkMode>once</forkMode>
          <includes>
            <include>**/*Tests.java</include>
          </includes>
          <excludes>
            <exclude>**/Abstract*.java</exclude>
          </excludes>
          <additionalClasspathElements>
            <additionalClasspathElement>${project.build.directory}/test-lib/jdbc-driver.jar</additionalClasspathElement>
          </additionalClasspathElements>
        </configuration>
      </plugin>
      </plugins>
    </pluginManagement>
    
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <id>enforce</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>2.0.9</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>${jdk.version}</version>
                </requireJavaVersion>
                <bannedDependencies>
                  <excludes>
                    <exclude>cglib:cglib</exclude>
                    <exclude>cglib:cglib-full</exclude>
                  </excludes>
                  <includes>
                    <include>cglib:cglib:provided</include>
                    <include>cglib:cglib-full:provided</include>
                  </includes>
                  <searchTransitive>true</searchTransitive>
                </bannedDependencies>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!--
      <plugin>
        <groupId>com.atlassian.maven.plugins</groupId>
        <artifactId>maven-clover2      lugin</artifactId>
        <version>${clover.version}</version>
        <configuration>
          <license><![CDATA[oPpoNpLipDQKHHXaIXJPCIsoqRpdAfeXwIImkDIRoTnriq
mi2KuXZFGad>>Lz0ULLXhqIo2KPjARsdren1aP3vzebzkM
qNNNUvQNpqopPoOQRqmTvqoPnOnMopRPqpSUtxrWTxOxTu
pTSqrOnmqmUUnopqmvummmmmmUUnopqmvummmmmmUUA1jJ
97W9kZkUUnmm]]></license>
          <jdk>${jdk.version}</jdk>
          <generateXml>true</generateXml>
          <generateHtml>true</generateHtml>
          <includes>
            <include>**/*.java</include>
          </includes>
          <excludes>
            <exclude>**/CasVersion.java</exclude>
            <exclude>
              **/SamlCompliantUniqueTicketIdGenerator.java
            </exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>instrument</goal>
            </goals>
          </execution>
        </executions>
      </plugin>-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>${jdk.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2.1</version>
        <configuration>
          <descriptors>
            <descriptor>${basedir}/assembly.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
        <!-- 
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
        <version>1.10</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <source>1.6</source>
          <target>${jdk.version}</target>
        </configuration>
      </plugin>
        -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.2.1</version>
        <configuration>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <tagNameFormat>v@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
      <!-- CAS-988 generate hashes for assembly artifacts -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.5</version>
        <configuration>
          <target>
            <ant antfile="tasks.xml" target="genhash" />
          </target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <configuration>
          <header>src/licensing/header.txt</header>
          <headerDefinitions>
            <headerDefinition>src/licensing/header-definitions.xml</headerDefinition>
          </headerDefinitions>
          <aggregate>true</aggregate>
          <excludes>
            <exclude>LICENSE</exclude>
            <exclude>**/INSTALL*</exclude>
            <exclude>**/NOTICE*</exclude>
            <exclude>**/README*</exclude>
            <exclude>**/readme*</exclude>
            <exclude>**/*.log</exclude>
            <exclude>**/*.license</exclude>
            <exclude>**/*.txt</exclude>
            <exclude>**/*.crt</exclude>
            <exclude>**/*.crl</exclude>
            <exclude>**/*.key</exclude>
            <exclude>**/.gitignore</exclude>
            <exclude>**/.eclipse/**</exclude>
            <exclude>**/.idea/**</exclude>
            <exclude>**/overlays/**</exclude>
            <exclude>src/licensing/**</exclude>
            <exclude>**/testCA/**</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>

	<dependency>
		<groupId>org.mockito</groupId>
	    <artifactId>mockito-core</artifactId>
	    <version>${mockito.version}</version>
	    <scope>test</scope>
	</dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>${spring.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <scope>compile</scope>
      <version>${aspectj.version}</version>
    </dependency>

    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
      <scope>compile</scope>
      <version>${aspectj.version}</version>
    </dependency>

    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>${javax.validation.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${slf4j.version}</version>
      <scope>runtime</scope>
      <type>jar</type>
      <exclusions>
        <exclusion>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <version>${slf4j.version}</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>jasig-repository</id>
      <name>Jasig Maven2 Repository</name>
      <url>http://developer.ja-sig.org/maven2</url>
    </repository>

    <repository>
      <id>jboss</id>
      <name>JBoss Repository</name>
      <layout>default</layout>
      <url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>mojo-snapshot</id>
      <name>Codehause Mojo Snapshot Repository</name>
      <url>https://nexus.codehaus.org/content/repositories/codehaus-snapshots/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>${commons.lang.version}</version>
      </dependency>
      
      <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache-core</artifactId>
        <version>${ehcache.version}</version>
      </dependency>  

      <!-- Inspektr Dependencies -->
      <dependency>
        <groupId>com.github.inspektr</groupId>
        <artifactId>inspektr-audit</artifactId>
        <version>${inspektr.version}</version>
      </dependency>

      <dependency>
        <groupId>com.github.inspektr</groupId>
        <artifactId>inspektr-common</artifactId>
        <version>${inspektr.version}</version>
      </dependency>

      <dependency>
        <groupId>com.github.inspektr</groupId>
        <artifactId>inspektr-support-spring</artifactId>
        <version>${inspektr.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-jexl</groupId>
        <artifactId>commons-jexl</artifactId>
        <version>1.1</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.jasig.service.persondir</groupId>
        <artifactId>person-directory-impl</artifactId>
        <version>${person.directory.version}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>${commons.codec.version}</version>
        <scope>compile</scope>
      </dependency>

      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>${hibernate.core.version}</version>
        <type>jar</type>
      </dependency>

      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>${hibernate.core.version}</version>
        <type>jar</type>
      </dependency>

      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-annotations</artifactId>
        <version>${hibernate.core.version}</version>
        <scope>compile</scope>
        <type>jar</type>
      </dependency>

      <dependency>
        <groupId>org.hibernate.java-persistence</groupId>
        <artifactId>jpa-api</artifactId>
        <version>${jpa.version}</version>
        <scope>compile</scope>
      </dependency>

      <!-- Spring Security Managed Dependencies -->
      <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-cas</artifactId>
        <version>${spring.security.version}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>${spring.security.version}</version>
      </dependency>

      <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>${spring.security.version}</version>
      </dependency>

      <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>${spring.security.version}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- Spring Managed Dependencies -->
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aop</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aspects</artifactId>
        <version>${spring.version}</version>
      </dependency>

      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.version}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-instrument</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jms</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-oxm</artifactId>
        <version>${spring.version}</version>
      </dependency>

      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.webflow</groupId>
        <artifactId>spring-webflow</artifactId>
        <version>${spring.webflow.version}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.springframework.ldap</groupId>
        <artifactId>spring-ldap-core-tiger</artifactId>
        <version>${spring.ldap.version}</version>
        <scope>compile</scope>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.springframework.ldap</groupId>
        <artifactId>spring-ldap-core</artifactId>
        <version>${spring.ldap.version}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>${servlet.api.version}</version>
      </dependency>

      <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjweaver</artifactId>
        <version>${aspectj.version}</version>
      </dependency>

      <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjrt</artifactId>
        <version>${aspectj.version}</version>
      </dependency>

      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>${hibernate.validator.version}</version>
      </dependency>

      <dependency>
        <groupId>org.hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>${hsqldb.version}</version>
      </dependency>

      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>${joda-time.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <modules>
    <module>cas-server-core</module>
    <module>cas-server-webapp</module>
    <module>cas-server-support-jdbc</module>    
  </modules>

  <profiles>
    <profile>
      <id>ci</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8</version>
            <configuration>
              <charset>UTF-8</charset>
              <encoding>UTF-8</encoding>
              <docencoding>UTF-8</docencoding>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  
  <properties>
    <issues.projectKey>CAS</issues.projectKey>
    <spring.webflow.version>2.3.0.RELEASE</spring.webflow.version>
    <spring.version>3.1.1.RELEASE</spring.version>
    <spring.ldap.version>1.3.1.RELEASE</spring.ldap.version>
    <spring.security.version>3.1.0.RELEASE</spring.security.version>
    <clover.version>2.6.3</clover.version>
    <aspectj.version>1.8.10</aspectj.version>
    <javax.validation.version>1.0.0.GA</javax.validation.version>
    <perf4j.version>0.9.14</perf4j.version>
    <commons.jexl.version>1.1</commons.jexl.version>
    <hibernate.validator.version>4.2.0.Final</hibernate.validator.version>
    <hibernate.core.version>4.1.0.Final</hibernate.core.version>
    <slf4j.version>1.7.1</slf4j.version>
    <person.directory.version>1.5.1</person.directory.version>
    <servlet.api.version>2.5</servlet.api.version>
    <jpa.version>2.0-cr-1</jpa.version>
    <commons.codec.version>1.4</commons.codec.version>
    <log4j.version>1.2.15</log4j.version>
    <junit.version>4.10</junit.version>
    <commons.lang.version>2.5</commons.lang.version>
    <inspektr.version>1.0.7.GA</inspektr.version>
    <commons.io.version>2.0</commons.io.version>
    <mockito.version>1.9.0</mockito.version>
    <jdk.version>1.8</jdk.version>
    <ehcache.version>2.6.0</ehcache.version>
    <hsqldb.version>2.0.0</hsqldb.version>
    <joda-time.version>2.1</joda-time.version>
  </properties>
</project>
