<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>org.dspace</groupId>
   <artifactId>dspace-jspui-webapp</artifactId>
   <name>DSpace JSP-UI :: Web Application Resources</name>
   <packaging>war</packaging>
   <url>http://projects.dspace.org/dspace-jspui/dspace-jspui-webapp</url>
   <description>DSpace JSP Based Webapplication Resources</description>

   <!--
      A Parent POM that Maven inherits DSpace Default
      POM atrributes from.
   -->
   <parent>
      <groupId>org.dspace</groupId>
      <artifactId>dspace-jspui</artifactId>
      <version>1.8.2</version>
      <relativePath>..</relativePath>
   </parent>

   <!--
      The Subversion repository location is used by Continuum to update against
      when changes have occured, this spawns a new build cycle and releases snapshots
      into the snapshot repository below.
   -->
   <scm>
      <connection>scm:svn:http://scm.dspace.org/svn/repo/tags/dspace-1.8.2</connection>
      <developerConnection>scm:svn:https://scm.dspace.org/svn/repo/tags/dspace-1.8.2</developerConnection>
      <url>http://scm.dspace.org/svn/repo/tags/dspace-1.8.2</url>
   </scm>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
               <archiveClasses>false</archiveClasses>
               <!-- In version 2.1-alpha-1, this was incorrectly named warSourceExcludes -->
               <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
               <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
               <webResources>
                  <resource>
                     <filtering>true</filtering>
                     <directory>${basedir}/src/main/webapp</directory>
                     <includes>
                        <include>WEB-INF/web.xml</include>
                     </includes>
                  </resource>
               </webResources>
            </configuration>
            <executions>
               <execution>
                  <phase>prepare-package</phase>
               </execution>
            </executions>
         </plugin>
         <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <configuration>
                    <!--Exclude license check for JSPUI files which don't need it-->
                    <excludes>
                        <exclude>**/META-INF/**</exclude>
                        <exclude>**/fmt.tld</exclude>
                        <exclude>**/robots.txt</exclude>
                        <exclude>**/readme*</exclude>
                        <exclude>**/scriptaculous/**</exclude>
                        <exclude>**/jquery*</exclude>
                    </excludes>
                </configuration>
            </plugin>
      </plugins>
   </build>

   <profiles>
      <!--
         when activated a dspace.config configuration
         file location passed on the commandline
         (-Ddspace.config=...) can be passed through
         to be used as a filter source by projects for
         tasks such as updating the ${dspace.dir} in
         web.xml etc.
      -->
      <profile>
         <activation>
            <property>
               <name>dspace.config</name>
            </property>
         </activation>
         <build>
            <filters>
               <filter>${dspace.config}</filter>
            </filters>
         </build>
      </profile>
      <profile>
         <id>oracle-support</id>
         <activation>
            <property>
               <name>db.name</name>
               <value>oracle</value>
            </property>
         </activation>
         <dependencies>
            <dependency>
               <groupId>com.oracle</groupId>
               <artifactId>ojdbc6</artifactId>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>postgres-support</id>
         <activation>
            <property>
               <name>!db.name</name>
            </property>
         </activation>
         <dependencies>
            <dependency>
               <groupId>postgresql</groupId>
               <artifactId>postgresql</artifactId>
            </dependency>
         </dependencies>
      </profile>
   </profiles>

   <dependencies>
      <dependency>
         <groupId>org.dspace</groupId>
         <artifactId>dspace-api</artifactId>
      </dependency>
      <dependency>
         <groupId>org.dspace</groupId>
         <artifactId>dspace-jspui-api</artifactId>
      </dependency>
      <dependency>
      	<groupId>javax.servlet</groupId>
      	<artifactId>jsp-api</artifactId>
      	<version>2.0</version>
      	<type>jar</type>
      	<scope>provided</scope>
      </dependency>
   </dependencies>

</project>
