<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (C) 2007 - 2010 GeoSolutions S.A.S.
 http://www.geo-solutions.it

 GPLv3 + Classpath exception

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
<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>

    <parent>
        <groupId>it.geosolutions.geofence</groupId>
        <artifactId>geofence-core</artifactId>
        <version>2.2-SNAPSHOT</version>
    </parent>

    <groupId>it.geosolutions.geofence</groupId>
    <artifactId>geofence-services-impl</artifactId>
    <packaging>jar</packaging>
    <name>GeoFence - Core - Services implementation</name>

    <dependencies>

	    <!-- =========================================================== -->
	    <!--     GeoFence Core Modules                                    -->
	    <!-- =========================================================== -->

        <dependency>
            <groupId>it.geosolutions.geofence</groupId>
            <artifactId>geofence-model-internal</artifactId>
        </dependency>

        <dependency>
            <groupId>it.geosolutions.geofence</groupId>
            <artifactId>geofence-persistence</artifactId>
        </dependency>

        <dependency>
            <groupId>it.geosolutions.geofence</groupId>
            <artifactId>geofence-services-api</artifactId>
        </dependency>

	    <!-- =========================================================== -->
        <!-- APACHE COMMONS -->

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>

        <!-- This dep is needed in core::dao, but seems not to be transitively imported-->
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        			
        <!-- =========================================================== -->
        <!-- SPRING -->

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jmx</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- =========================================================== -->
        <!-- MISC -->

        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>
        
        

        <!-- =========================================================== -->
        <!-- PERSISTENCE -->

<!--        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>persistence-api</artifactId>
            <scope>provided</scope>
        </dependency> -->
        
        <dependency>
            <groupId>org.hibernatespatial</groupId>
            <artifactId>hibernate-spatial-h2-geodb</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- HIBERNATE-GENERIC-DAO -->
        <dependency>
            <groupId>com.googlecode.genericdao</groupId>
            <artifactId>dao</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.googlecode.genericdao</groupId>
            <artifactId>search-jpa-hibernate</artifactId>
        </dependency>


<!--        <dependency>
            <groupId>com.trg</groupId>
            <artifactId>trg-dao</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.trg</groupId>
            <artifactId>trg-search-jpa-hibernate</artifactId>
        </dependency>-->

        <!-- HIBERNATE-SPATIAL -->
        <!-- dependency>
            <groupId>org.hibernatespatial</groupId>
            <artifactId>hibernate-spatial-postgis</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency -->
	
  		<!-- CGLIB -->
<!--        <dependency>
            <groupId>asm</groupId>
            <artifactId>asm</artifactId>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
        </dependency>-->

    <!-- HTTP UTILS -->
<!--        <dependency>
            <groupId>org.codehaus.jettison</groupId>
            <artifactId>jettison</artifactId>
        </dependency>-->
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
        </dependency>
	
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
    	      
        <!-- CXF -->
<!--        <dependency>
            <groupId>javax.xml.ws</groupId>
            <artifactId>jaxws-api</artifactId>
        </dependency>-->
      <!-- Velocity (Email templates) -->
<!--        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
        </dependency>-->

	    <!-- =========================================================== -->
        <!-- TEST -->

        <!-- Avoids java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl -->
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
            <scope>test</scope>
        </dependency>

	    <!-- JUnit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>
  
    <build>
<!--        <finalName>${main-prefix}-${project.artifactId}-${project.version}</finalName>-->

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>
    </build>

    <profiles>
        <profile>
            <id>cob</id>
            <build>
                <plugins>

                    <!-- Instrument classes -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>cobertura-maven-plugin</artifactId>
                        <version>2.4</version>
                        <configuration>
                            <instrumentation>
                            </instrumentation>
                        </configuration>
                        <executions>
                            <execution>
                                <id>instrument_ws_impl</id>
                                <phase>process-classes</phase>
                                <goals>
                                    <goal>instrument</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>