<!--

    Copyright 2005-2013 The Kuali Foundation

    Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php

    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">
  <name>Rice Web</name>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.kuali.rice</groupId>
    <artifactId>rice-middleware</artifactId>
    <version>2.3.2</version>
  </parent>
  <artifactId>rice-web</artifactId>
  <packaging>war</packaging>

  <properties>
    <monitoring.filter />
    <monitoring.mapping />
    <monitoring.listener />
    <war.overlay.exclude.2>DO_NOT_MATCH_ANYTHING_PATTERN</war.overlay.exclude.2>
  </properties>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>rice-krad-web</artifactId>
      <version>${project.version}</version>
      <type>war</type>
    </dependency>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>rice-krms-impl</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>rice-location-web</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>rice-location-impl</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>rice-kew-impl</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>rice-ksb-web</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>rice-impl</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>rice-kns</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>rice-edl-impl</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>${mysql.jdbc.artifactId}</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webResources>
            <resource>
              <filtering>true</filtering>
              <!-- this is relative to the pom.xml directory -->
              <directory>src/main/webapp/</directory>
              <includes>
                <include>**/web.xml</include>
              </includes>
            </resource>
          </webResources>

          <overlays>
            <overlay>
              <groupId>${project.groupId}</groupId>
              <artifactId>rice-krad-web</artifactId>
              <excludes>
                <exclude>${war.overlay.exclude.2}</exclude>
              </excludes>
              <filtered>false</filtered>
            </overlay>
          </overlays>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <configuration>
              <tasks>
                <echo>Extracting Help Files</echo>
                <unzip src="${basedir}/src/main/help/RiceHelp.zip" dest="${project.build.directory}/help/kr/static/help/" />
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
    	<plugins>
    		<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
    		<plugin>
    			<groupId>org.eclipse.m2e</groupId>
    			<artifactId>lifecycle-mapping</artifactId>
    			<version>1.0.0</version>
    			<configuration>
    				<lifecycleMappingMetadata>
    					<pluginExecutions>
    						<pluginExecution>
    							<pluginExecutionFilter>
    								<groupId>com.samaxes.maven</groupId>
    								<artifactId>
    									maven-minify-plugin
    								</artifactId>
    								<versionRange>
    									[1.3.5,)
    								</versionRange>
    								<goals>
    									<goal>minify</goal>
    								</goals>
    							</pluginExecutionFilter>
    							<action>
    								<ignore />
    							</action>
    						</pluginExecution>
    						<pluginExecution>
    							<pluginExecutionFilter>
    								<groupId>
    									org.apache.maven.plugins
    								</groupId>
    								<artifactId>
    									maven-antrun-plugin
    								</artifactId>
    								<versionRange>[1.7,)</versionRange>
    								<goals>
    									<goal>run</goal>
    								</goals>
    							</pluginExecutionFilter>
    							<action>
    								<ignore />
    							</action>
    						</pluginExecution>
    					</pluginExecutions>
    				</lifecycleMappingMetadata>
    			</configuration>
    		</plugin>
    	</plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>kuali-release</id>
      <properties>
        <war.overlay.exclude.2>**/ojdbc*.jar</war.overlay.exclude.2>
      </properties>
    </profile>

    <profile>
      <id>monitoring</id>
      <properties>
        <monitoring.filter>
          <![CDATA[
<filter>
    <filter-name>monitoring</filter-name>
    <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
    <init-param>
        <param-name>log</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
             <param-name>system-actions-enabled</param-name>
             <param-value>true</param-value>
    </init-param>
    <init-param>
              <param-name>url-exclude-pattern</param-name>
              <param-value>/static/.*|/kr/static/.*|/kr/images/.*|/images-portal/.*</param-value>
    </init-param>
</filter>
          ]]>
        </monitoring.filter>
        <monitoring.mapping>
          <![CDATA[
<filter-mapping>
    <filter-name>monitoring</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
          ]]>
        </monitoring.mapping>
        <monitoring.listener>
          <![CDATA[
<listener>
    <listener-class>net.bull.javamelody.SessionListener</listener-class>
</listener>
          ]]>
        </monitoring.listener>
      </properties>
      <build>
      </build>
      <dependencies>
        <!-- javamelody-core -->
        <dependency>
          <groupId>net.bull.javamelody</groupId>
          <artifactId>javamelody-core</artifactId>
          <version>1.43.0</version>
        </dependency>
        <!-- itext, option to add PDF export -->
        <dependency>
          <groupId>com.lowagie</groupId>
          <artifactId>itext</artifactId>
          <version>2.1.7</version>
          <exclusions>
            <exclusion>
              <artifactId>bcmail-jdk14</artifactId>
              <groupId>bouncycastle</groupId>
            </exclusion>
            <exclusion>
              <artifactId>bcprov-jdk14</artifactId>
              <groupId>bouncycastle</groupId>
            </exclusion>
            <exclusion>
              <artifactId>bctsp-jdk14</artifactId>
              <groupId>bouncycastle</groupId>
            </exclusion>
          </exclusions>
        </dependency>
        <dependency>
          <groupId>org.jrobin</groupId>
          <artifactId>jrobin</artifactId>
          <version>1.5.9</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

</project>
