<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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

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

	<groupId>it.geosolutions.geofence</groupId>
	<artifactId>geofence-gui-resources</artifactId>
	<packaging>jar</packaging>

	<name>GeoFence - GUI - Resources</name>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<dependencies>

		<!-- =============================================================== -->
	    <!-- GeoGWT Core                                                 -->
	    <!-- =========================================================== -->
	
	<dependency>
		<groupId>it.geosolutions.geogwt.core</groupId>
		<artifactId>geogwt-resources</artifactId>
		<exclusions>
			<exclusion>
				<groupId>org.slf4j</groupId>
				<artifactId>jcl-over-slf4j</artifactId>
			</exclusion>
			<exclusion>
				<groupId>org.slf4j</groupId>
				<artifactId>log4j-over-slf4j</artifactId>
			</exclusion>
			<exclusion> <!-- includes SNAPSHOT version we don't want-->
				<groupId>org.geotools</groupId>
				<artifactId>gt-wfs</artifactId>
			</exclusion>
			<exclusion> <!-- includes SNAPSHOT version we don't want-->
				<groupId>org.geotools</groupId>
				<artifactId>gt-wms</artifactId>
			</exclusion>
		</exclusions>
	</dependency>

	<!-- re-include proper versions -->
	<dependency>
		<groupId>org.geotools</groupId>
		<artifactId>gt-wfs</artifactId>
	</dependency>
	<dependency>
		<groupId>org.geotools</groupId>
		<artifactId>gt-wms</artifactId>
	</dependency>
	
    	<!-- =============================================================== -->

		<!-- GeoGWT -->
		<dependency>
			<groupId>it.geosolutions.geogwt.widgets.map</groupId>
			<artifactId>maptoolbar</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
		</dependency>
		
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- GXT -->
		<dependency>
			<groupId>com.extjs</groupId>
			<artifactId>gxt</artifactId>
		</dependency>

        <!-- =============================================================== -->
		<!-- GEOREPO SERVICES DEPENDENCIES -->
        <!-- =============================================================== -->

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

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

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

        <dependency>
        	<groupId>it.geosolutions.geofence</groupId>
            <artifactId>geofence-login-impl</artifactId>
		</dependency>

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

        <!-- =============================================================== -->
		<!-- SPRING -->
        <!-- =============================================================== -->

        <dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
		</dependency>

		<dependency>
			<groupId>javax.annotation</groupId>
			<artifactId>jsr250-api</artifactId>
			<version>1.0</version>
		</dependency>

		<!-- logging dependencies, delegate all to slf4j and use logback -->
<!--		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.5.8</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>1.5.8</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>log4j-over-slf4j</artifactId>
			<version>1.5.8</version>
		</dependency>-->
<!--		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>0.9.9</version>
		</dependency>-->

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.7</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.xml.ws</groupId>
			<artifactId>jaxws-api</artifactId>
<!--			<version>2.1</version>-->
		</dependency>

		<dependency>
			<groupId>com.vividsolutions</groupId>
			<artifactId>jts</artifactId>
		</dependency>

		<!-- SCOPE TEST -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>commons-collections</groupId>
					<artifactId>commons-collections</artifactId>
				</exclusion>
				<exclusion>
					<groupId>xerces</groupId>
					<artifactId>xercesImpl</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- ... or ask the plugin to detect them based on gwt modules files and 
				copy the required java sources -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
				<version>${gwt.version}</version>
				<executions>
					<!-- GWT version detected from dependencyManagement -->
					<execution>
						<goals>
							<goal>resources</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- tell the compiler we can use 1.5 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
			</plugin>
		</plugins>

		<!-- TODO: the resources stuff hardcodes paths to source + test directories, 
			we should be able to use some properties here -->
		<resources>
			<resource>
				<directory>${basedir}/src/main/java</directory>
				<includes>
					<include>**/*.txt</include>
					<include>**/*.sql</include>
					<include>**/*.html</include>
					<include>**/*.xml</include>
					<include>**/*.utf</include>
					<include>**/*.properties</include>
					<include>**/*.serialized</include>
					<include>**/*.xsd</include>
					<include>META-INF/*.jai</include>
					<include>META-INF/mailcap</include>
					<include>META-INF/services/**</include>
					<include>applicationContext.xml</include>
					<include>**/*.ftl</include>
					<include>**/*.css</include>
					<include>**/*.js</include>
					<include>**/*.png</include>
					<include>**/*.gif</include>
					<include>**/*.sld</include>
					<include>**/*.ico</include>
				</includes>
			</resource>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
				<includes>
					<include>**/*</include>
				</includes>
			</resource>
		</resources>

	</build>
</project>
