<?xml version="1.0" encoding="UTF-8"?>
<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.gcube.portlets.admin</groupId>
	<artifactId>software-upload-wizard</artifactId>
	<packaging>jar</packaging>
	<version>1.1.0-2.12.0</version>
	<name>Software Upload Wizard</name>
	<description>Wizard widget that allows admins to Upload software on the gCube infrastructure.</description>

	<scm>
		<url>https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/SoftwareUploadWizard/</url>
	</scm>

	<parent>
		<artifactId>maven-parent</artifactId>
		<groupId>org.gcube.tools</groupId>
		<version>1.0.0</version>
	</parent>

	<properties>
		<release.date>15-01-2013</release.date>
		<!-- Convenience property to set the GWT version -->
		<gwtVersion>2.4.0</gwtVersion>
		<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<liferay.version>6.0.6</liferay.version>
		<guice.version>3.0</guice.version>
		<GLOBUS_LOCATION>${env.GLOBUS_LOCATION}</GLOBUS_LOCATION>

		<!-- Directories -->
		<templatesDirectory>templates</templatesDirectory>
		<distroDirectory>distro</distroDirectory>
		<configDirectory>config</configDirectory>
	</properties>

	<dependencies>
		<!-- GWT -->
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-servlet</artifactId>
			<version>${gwtVersion}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<version>${gwtVersion}</version>
			<scope>provided</scope>
		</dependency>
		
		<!-- liferay -->
		<dependency>
			<groupId>com.liferay.portal</groupId>
			<artifactId>portal-service</artifactId>
			<version>${liferay.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.liferay.portal</groupId>
			<artifactId>util-bridges</artifactId>
			<version>${liferay.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.liferay.portal</groupId>
			<artifactId>util-taglib</artifactId>
			<version>${liferay.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.liferay.portal</groupId>
			<artifactId>util-java</artifactId>
			<version>${liferay.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.portlet</groupId>
			<artifactId>portlet-api</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.4</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- gcube stuff -->
		<dependency>
			<groupId>org.gcube.informationsystem</groupId>
			<artifactId>is-client</artifactId>
			<version>1.5.1-2.12.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.informationsystem</groupId>
			<artifactId>is-collector-stubs</artifactId>
			<version>3.0.0-2.12.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resourcemanagement</groupId>
			<artifactId>softwaregateway_client</artifactId>
			<version>1.0.1-2.12.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resourcemanagement</groupId>
			<artifactId>softwaregateway-stubs</artifactId>
			<version>1.1.2-2.12.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.portal</groupId>
			<artifactId>custom-portal-handler</artifactId>
			<version>1.2.0-2.12.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- guava -->
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>12.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- guice -->
		<dependency>
			<groupId>com.google.inject</groupId>
			<artifactId>guice</artifactId>
			<version>${guice.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.google.inject.extensions</groupId>
			<artifactId>guice-servlet</artifactId>
			<version>${guice.version}</version>
			<scope>provided</scope>
		</dependency>
		<!-- gwt-dispatch -->
		<dependency>
			<groupId>net.customware.gwt.dispatch</groupId>
			<artifactId>gwt-dispatch</artifactId>
			<version>1.2.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- gxt -->
		<dependency>
			<groupId>com.sencha.gxt</groupId>
			<artifactId>gxt</artifactId>
			<version>2.2.5</version>
			<scope>provided</scope>
		</dependency>
		<!-- Apache commons -->
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.6</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-compress</artifactId>
			<version>1.4.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
			<version>1.2.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
			<scope>provided</scope>
		</dependency>
		<!-- logging -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.6.4</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.allen-sauer.gwt.log</groupId>
			<artifactId>gwt-log</artifactId>
			<version>3.1.8</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**/*.java</include>
				</includes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<includes>
					<include>**/*</include>
				</includes>
			</resource>
		</resources>
		<!-- Generate compiled stuff in the folder used for developing mode -->
		<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>

		<plugins>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
				<version>2.4.0</version>
				<executions>
					<execution>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
				<!-- Plugin configuration. There are many available options, see gwt-maven-plugin 
					documentation at codehaus.org -->
				<configuration>
<!-- 					<additionalClasspathElements> -->
<!-- 						<additionalClasspathElement>${env.GLOBUS_LOCATION}</additionalClasspathElement> -->
<!-- 					</additionalClasspathElements> -->
					<extraJvmArgs>-Xmx512M -DGLOBUS_LOCATION=${env.GLOBUS_LOCATION}	-classpath ${env.GLOBUS_LOCATION}</extraJvmArgs>
					<runTarget>SoftwareUploadWizardWidget.html</runTarget>
					<hostedWebapp>${webappDirectory}</hostedWebapp>
				</configuration>
			</plugin>

			<!-- Copy static web files before executing gwt:run -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>exploded</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<webappDirectory>${webappDirectory}</webappDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.6</version>
				<executions>
					<execution>
						<id>copy-profile</id>
						<phase>process-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${configDirectory}</outputDirectory>
							<resources>
								<resource>
									<directory>${templatesDirectory}</directory>
									<includes>
										<include>profile.xml</include>
									</includes>
									<filtering>true</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
					<execution>
						<id>copy-distro-resources</id>
						<phase>process-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${distroDirectory}</outputDirectory>
							<resources>
								<resource>
									<directory>${templatesDirectory}</directory>
									<excludes>
										<exclude>profile.xml</exclude>
										<exclude>descriptor.xml</exclude>
									</excludes>
									<filtering>true</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-clean-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<filesets>
						<fileset>
							<directory>logs</directory>
							<includes>
								<include>**</include>
							</includes>
							<followSymlinks>false</followSymlinks>
						</fileset>
						<fileset>
							<directory>${distroDirectory}</directory>
							<includes>
								<include>**</include>
							</includes>
							<followSymlinks>false</followSymlinks>
						</fileset>
						<fileset>
							<directory>${configDirectory}</directory>
							<includes>
								<include>**</include>
							</includes>
							<followSymlinks>false</followSymlinks>
						</fileset>
					</filesets>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<descriptors>
						<descriptor>${templatesDirectory}/descriptor.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<id>servicearchive</id>
						<phase>package</phase>
						<goals>
							<goal>single</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>org.codehaus.mojo</groupId>
										<artifactId>
											gwt-maven-plugin
										</artifactId>
										<versionRange>
											[2.5.0,)
										</versionRange>
										<goals>
											<goal>generateAsync</goal>
											<goal>i18n</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

</project>