<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed to Apereo under one or more contributor license
    agreements. See the NOTICE file distributed with this work
    for additional information regarding copyright ownership.
    Apereo 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 the following location:

      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.jasig.parent</groupId>
        <artifactId>jasig-parent</artifactId>
        <version>41</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.jasig.portlet</groupId>
    <artifactId>NewsReaderPortlet</artifactId>
    <packaging>war</packaging>
    <version>4.2.2</version>

    <!-- More Project Information -->
    <name>News Portlet</name>
    <description>News Portlet.</description>
    <url>http://wiki.jasig.org/display/PLT/NewsReaderPortlet</url>
    <inceptionYear>2009</inceptionYear>
    <developers>
        <developer>
            <id>acolebourne</id>
            <email>anthony@acolebourne.co.uk</email>
            <name>Anthony Colebourne</name>
            <organization>University of Manchester</organization>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>0</timezone>
        </developer>
        <developer>
            <id>bourey</id>
            <email>jennifer.bourey@gmail.com</email>
            <name>Jennifer Bourey</name>
            <organization>Unicon, Inc.</organization>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/Jasig/NewsReaderPortlet.git</connection>
        <developerConnection>scm:git:git@github.com:Jasig/NewsReaderPortlet.git</developerConnection>
        <url>https://github.com/Jasig/NewsReaderPortlet</url>
      <tag>NewsReaderPortlet-4.2.2</tag>
    </scm>

    <repositories>
        <repository>
            <id>java.net repository</id>
            <url>http://download.java.net/maven/2</url>
        </repository>
        <repository>
            <id>jasig-3rd-party</id>
            <name>Jasig 3rd Party Repository</name>
            <url>http://developer.jasig.org/repo/content/repositories/3rd-party</url>
            <releases><enabled>true</enabled></releases>
            <snapshots><enabled>false</enabled></snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Maven 2 Repository</name>
            <url>http://download.java.net/maven/2</url>
        </pluginRepository>
    </pluginRepositories>

    <properties>
        <ehcache.version>2.6.11</ehcache.version>
        <hibernate.version>3.6.10.Final</hibernate.version>
        <icu4j.version>51.1</icu4j.version>
        <spring.version>4.1.5.RELEASE</spring.version>
        <resource-server.version>1.0.43</resource-server.version>
        <httpclient.version>4.4</httpclient.version>
        <antisamy.version>1.5.3</antisamy.version>
        <junit.version>4.12</junit.version>
        <servlet-api.version>3.0.1</servlet-api.version>
        
        <!-- The JDBC Driver used by the portlet -->
        <jdbc.groupId>org.hsqldb</jdbc.groupId>
        <jdbc.artifactId>hsqldb</jdbc.artifactId>
        <jdbc.version>2.2.9</jdbc.version>
        <tomcat-jdbc.version>8.5.4</tomcat-jdbc.version>
        <logback.version>1.1.7</logback.version>
        <slf4j.version>1.7.21</slf4j.version>
    </properties>
    
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${jdbc.groupId}</groupId>
                <artifactId>${jdbc.artifactId}</artifactId>
                <version>${jdbc.version}</version>
            </dependency>
            <dependency>
                <groupId>com.googlecode.cernunnos</groupId>
                <artifactId>cernunnos</artifactId>
                <version>1.3.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-beans</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-tx</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>rhino</groupId>
                        <artifactId>js</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jdom</groupId>
                        <artifactId>jdom</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.ibm.icu</groupId>
                <artifactId>icu4j</artifactId>
                <version>${icu4j.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-collections</groupId>
                <artifactId>commons-collections</artifactId>
                <version>3.2.2</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.tomcat</groupId>
                <artifactId>tomcat-jdbc</artifactId>
                <version>${tomcat-jdbc.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${httpclient.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>2.6</version>
            </dependency>
            <dependency>
                <groupId>javax.portlet</groupId>
                <artifactId>portlet-api</artifactId>
                <version>2.0</version>
                <type>jar</type>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>jstl</artifactId>
                <version>1.1.2</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>${servlet-api.version}</version>
                <type>jar</type>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>2.3.0</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.3.0</version>
            </dependency>
            <dependency>
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
                <version>2.11.0</version>
            </dependency>
            <dependency>
                <groupId>javassist</groupId>
                <artifactId>javassist</artifactId>
                <version>3.12.1.GA</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>${hibernate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-ehcache</artifactId>
                <version>${hibernate.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sf.ehcache</groupId>
                <artifactId>ehcache-core</artifactId>
                <version>${ehcache.version}</version>
            </dependency>
            <!-- For sl4j/logback logging, see https://wiki.jasig.org/display/PLT/Logging+Best+Practices -->
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.2</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>log4j-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
                <scope>runtime</scope>
            </dependency>
            <!-- End of logging section -->
            <dependency>
                <groupId>org.jasig.resourceserver</groupId>
                <artifactId>resource-server-content</artifactId>
                <version>${resource-server.version}</version>
                <type>war</type>
            </dependency>
            <dependency>
                <groupId>org.jasig.resourceserver</groupId>
                <artifactId>resource-server-utils</artifactId>
                <version>${resource-server.version}</version>            
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>jcl-over-slf4j</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>net.sf.ehcache</groupId>
                        <artifactId>ehcache</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-expression</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jasypt</groupId>
                <artifactId>jasypt-spring31</artifactId>
                <version>1.9.2</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>1.8.5</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
                <version>${spring.version}</version>
                <scope>runtime</scope>
            </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-jdbc</artifactId>
                <version>${spring.version}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</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-portlet</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.owasp.antisamy</groupId>
                <artifactId>antisamy</artifactId>
                <version>${antisamy.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-httpclient</groupId>
                        <artifactId>commons-httpclient</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.rometools</groupId>
                <artifactId>rome</artifactId>
                <version>1.5.1</version>
            </dependency>
            <dependency>
                <groupId>com.rometools</groupId>
                <artifactId>rome-modules</artifactId>
                <version>1.5.1</version>
            </dependency>
            <dependency>
                <groupId>taglibs</groupId>
                <artifactId>standard</artifactId>
                <version>1.1.2</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>1.9.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>${jdbc.groupId}</groupId>
            <artifactId>${jdbc.artifactId}</artifactId>
            <version>${jdbc.version}</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.cernunnos</groupId>
            <artifactId>cernunnos</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.portlet</groupId>
            <artifactId>portlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>javassist</groupId>
            <artifactId>javassist</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-ehcache</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache-core</artifactId>
        </dependency>
        <!-- Logging section -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <!-- End of logging section -->
        <dependency>
            <groupId>org.jasig.resourceserver</groupId>
            <artifactId>resource-server-content</artifactId>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.jasig.resourceserver</groupId>
            <artifactId>resource-server-utils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt-spring31</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc-portlet</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
        </dependency>
        <dependency>
            <groupId>org.owasp.antisamy</groupId>
            <artifactId>antisamy</artifactId>
        </dependency>
        <dependency>
            <groupId>com.rometools</groupId>
            <artifactId>rome</artifactId>
        </dependency>
        <dependency>
            <groupId>com.rometools</groupId>
            <artifactId>rome-modules</artifactId>
        </dependency>
        <dependency>
            <groupId>taglibs</groupId>
            <artifactId>standard</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.9</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <localCheckout>true</localCheckout>
                    <tagNameFormat>NewsReaderPortlet-@{project.version}</tagNameFormat>
                </configuration>
              </plugin>
              <plugin>
                <groupId>org.jasig.resourceserver</groupId>
                <artifactId>resource-server-plugin</artifactId>
                <version>${resource-server.version}</version>
                <executions>
                    <execution>
                        <id>aggregate-resources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>batch-aggregate</goal>
                        </goals>
                        <inherited>false</inherited>
                        <configuration>
                            <displayJsWarnings>false</displayJsWarnings>
                            <includes>
                                <include>skin.xml</include>
                                <include>skin-shared.xml</include>
                            </includes>
                            <sharedJavaScriptDirectory>scripts/</sharedJavaScriptDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <aggregate>true</aggregate>
                    <excludes>
                        <exclude>.gitignore</exclude>
                        <exclude>target/**</exclude>
                        <exclude>bin/**</exclude>
                        <exclude>pom.xml.*</exclude>
                        <exclude>release.properties</exclude>
                        <exclude>**/NOTICE</exclude>
                        <exclude>NOTICE.template</exclude>
                        <exclude>README</exclude>
                        <exclude>LICENSE</exclude>
                        <exclude>src/main/webapp/rs/**</exclude>
                        <exclude>src/main/resources/antisamy/**</exclude>
                        <exclude>src/main/webapp/WEB-INF/dtd/**</exclude>
                        <exclude>src/main/webapp/WEB-INF/validator-rules.xml</exclude>
                        <exclude>.idea/**</exclude> <!-- Exclude intelliJ files -->
                        <exclude>overlays/**</exclude> <!-- Exclude intelliJ files -->
                    </excludes>
                    <mapping>
                        <channel>XML_STYLE</channel>
                        <crn>XML_STYLE</crn>
                        <less>SLASHSTAR_STYLE</less>
                        <tag>DYNASCRIPT_STYLE</tag>
                    </mapping>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <attachClasses>true</attachClasses>
                    <warName>NewsReaderPortlet</warName>
                    <overlays>
                        <overlay>
                            <groupId>org.jasig.resourceserver</groupId>
                            <artifactId>resource-server-content</artifactId>
                            <includes>
                                <include>rs/jquery/1.10.2/</include>
                                <include>rs/jquery-migrate/</include>
                                <include>rs/jqueryui/1.10.3/</include>
                                <include>rs/fluid/1.5.0/</include>
                                <include>rs/jquery-mobile/1.3.2/</include>
                                <include>rs/underscore/1.3.3/</include>
                                <include>rs/backbone/0.9.2/</include>
                                <include>rs/famfamfam/silk/1.3/bullet_feed.png</include>
                            </includes>
                        </overlay>
                    </overlays>
                </configuration>
            </plugin>
            <!-- Plug-in to add lifecycles to support db-init, data-import, and data-export -->
            <plugin>
                <groupId>org.jasig.portal.maven</groupId>
                <artifactId>uportal-maven-plugin</artifactId>
                <version>1.0.0</version>
                <!-- extensions must be set to true to pick up the custom phases -->
                <extensions>true</extensions>
            </plugin>
            <!-- NEWSPLT-105 Must run this before db-init hibernate3-maven-plugin to combine optional property files.
                 I couldn't see how to pass multiple property files to the hibernate3-maven-plugin -->
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>groovy-maven-plugin</artifactId>
                <version>2.0</version>
                <executions>
                    <execution>
                        <id>combine-optional-properties-files</id>
                        <phase>db-init</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <source>
                                def env = System.getenv()
                                def props = new Properties()
                                new File("${project.basedir}/target/${project.build.finalName}/WEB-INF/classes/datasource.properties").withInputStream {
                                    stream -&gt; props.load(stream)
                                }

                                def readIfExists = {filename -&gt;
                                    def file = new File(filename)
                                    if (file.exists()) {
                                        file.withInputStream {
                                            stream -&gt; props.load(stream)
                                        }
                                    }
                                }

                                readIfExists("${env['CATALINA_HOME']}/portal/overrides.properties")
                                readIfExists("${env['PORTAL_HOME']}/overrides.properties")
                                readIfExists("${env['CATALINA_HOME']}/portal/NewsReaderPortlet_overrides.properties")
                                readIfExists("${env['PORTAL_HOME']}/NewsReaderPortlet_overrides.properties")

                                // store will backslash escape #, !, =, and :. Will that be a problem?
                                props.store(new PrintStream("${project.basedir}/target/combined.properties"), "")
                            </source>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>2.4.5</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <!--
                 | Invoke this plugin as follows to drop and recreate the Calendar database tables...
                 |
                 |   >mvn db-init
                 +-->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>hibernate3-maven-plugin</artifactId>
                <version>2.2</version>
                <executions>
                    <execution>
                        <phase>db-init</phase>
                        <goals>
                            <goal>hbm2ddl</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <componentProperties>
                        <propertyfile>${project.basedir}/target/combined.properties</propertyfile>
                        <drop>true</drop>
                    </componentProperties>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>${jdbc.groupId}</groupId>
                        <artifactId>${jdbc.artifactId}</artifactId>
                        <version>${jdbc.version}</version>
                        <scope>compile</scope>
                    </dependency>
                </dependencies>
            </plugin>
            <!-- To import the news reader db tables, use mvn [-Ddir=dir] data-import -->
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>data-import</id>
                        <phase>data-import</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <!-- Set default value of data location if it is not set -->
                                <property name="dir" value="${basedir}/src/main/data" />

                                <property name="runtime_classpath" refid="maven.runtime.classpath" />
                                <property name="plugin_classpath" refid="maven.plugin.classpath" />
                                <!-- Provided jars don't seem to be added to the runtime
                                     classpath, so we manually add in servlet.jar here  -->
                                <property name="servlet.jar" value="${maven.dependency.javax.servlet.servlet-api.jar.path}" />
                                <property name="portlet.jar" value="${maven.dependency.javax.portlet.portlet-api.jar.path}" />

                                <java failonerror="true" classname="org.danann.cernunnos.runtime.Main">
                                    <sysproperty key="logback.configurationFile" value="command-line.logback.xml" />
                                    <classpath>
                                        <pathelement path="${runtime_classpath}" />
                                        <pathelement path="${plugin_classpath}" />
                                        <pathelement location="${servlet.jar}" />
                                        <pathelement location="${portlet.jar}" />
                                        <pathelement path="${project.build.directory}/${project.artifactId}/WEB-INF/classes" />
                                    </classpath>

                                    <arg value="classpath://org/jasig/portlet/newsreader/io/import.crn.xml" />
                                    <arg value="${dir}" />
                                </java>
                            </tasks>
                        </configuration>
                    </execution>
                    <execution>
                        <id>data-export</id>
                        <phase>data-export</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>

                                <fail unless="dir">
                                    You must set the "dir" parameter.  (-Ddir={something})
                                </fail>

                                <property name="runtime_classpath" refid="maven.runtime.classpath" />
                                <property name="plugin_classpath" refid="maven.plugin.classpath" />
                                <!-- Provided jars don't seem to be added to the runtime
                                     classpath, so we manually add in servlet.jar here  -->
                                <property name="servlet.jar" value="${maven.dependency.javax.servlet.servlet-api.jar.path}" />
                                <property name="portlet.jar" value="${maven.dependency.javax.portlet.portlet-api.jar.path}" />

                                <java failonerror="true" fork="true" classname="org.danann.cernunnos.runtime.Main">
                                    <sysproperty key="logback.configurationFile" value="command-line.logback.xml" />
                                    <classpath>
                                        <pathelement path="${runtime_classpath}" />
                                        <pathelement path="${plugin_classpath}" />
                                        <pathelement location="${servlet.jar}" />
                                        <pathelement location="${portlet.jar}" />
                                        <pathelement path="${project.build.directory}/${project.artifactId}/WEB-INF/classes" />
                                    </classpath>
                                    <!-- This may be helpful to troubleshoot CAP-137 -->
                                    <!--<jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" />-->

                                    <arg value="classpath://org/jasig/portlet/newsreader/io/export.crn.xml" />
                                    <arg value="${dir}" />
                                </java>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>rhino</groupId>
                        <artifactId>js</artifactId>
                        <version>1.7R1</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.lesscss</groupId>
                <artifactId>lesscss-maven-plugin</artifactId>
                <version>1.7.0.1.1</version>
                <configuration>
                    <sourceDirectory>${basedir}/src/main/webapp/less</sourceDirectory>
                    <outputDirectory>${project.build.directory}/${project.build.finalName}/css</outputDirectory>
                    <compress>true</compress>
                    <includes>
                        <include>newsreader.less</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
