<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>
		<artifactId>maven-parent</artifactId>
		<groupId>org.gcube.tools</groupId>
		<version>1.0.0</version>
	</parent>
	<groupId>org.gcube.distribution</groupId>
	<artifactId>ghn-distribution</artifactId>
	<version>3.8.1-2.17.2</version>
	<packaging>pom</packaging>
	<name>ghn distribution with maven</name>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.5.1</version>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>compile</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${basedir}/gCore/lib</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>false</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
							<excludeTypes>gar, tar.gz</excludeTypes>
							<stripVersion>false</stripVersion>
						</configuration>
					</execution>
					<execution>
						<id>install-ghn-distribution-bundle</id>
						<phase>compile</phase>
						<configuration>
							<includeArtifactIds>ghn-distribution-bundle</includeArtifactIds>
							<includeTypes>tar.gz</includeTypes>
							<overWriteIfNewer>false</overWriteIfNewer>
							<outputDirectory>${project.basedir}</outputDirectory>
							<markersDirectory>${project.basedir}</markersDirectory>
						</configuration>
						<goals>
							<goal>unpack-dependencies</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>compile</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<environmentVariables>
								<GLOBUS_LOCATION>${project.basedir}/gCore</GLOBUS_LOCATION>
								<ANT_HOME>${project.basedir}/gCore</ANT_HOME>
							</environmentVariables>
							<target>
								<echo message="${env.GLOBUS_LOCATION}" />
								<dependencyfilesets prefix="mydeps." types="gar" />
								<apply executable="${basedir}/gCore/bin/gcore-deploy-service">
									<fileset refid="mydeps.maven.project.dependencies" />
								</apply>
								<chmod perm="755" file="${basedir}/Utils/listDistributionFiles.sh" />
								<exec executable="${basedir}/Utils/listDistributionFiles.sh" />
								<copy todir="${basedir}/target" flatten="false">
									<fileset dir="${basedir}" casesensitive="yes">
										<include name="gCore" />
										<include name="gCore/**/*" />
									</fileset>
								</copy>
							</target>
						</configuration>
					</execution>
					<execution>
						<phase>compile</phase>
						<configuration>
							<target>
								<property name="deployer-version" value="2.4.1-SNAPSHOT" />
								<property name="deployer-id" value="deployer-service-${deployer-version}" />
								<replace dir="${basedir}/target/gCore/bin" token="org.gcube.common.vremanagement.deployer"
									value="${deployer-id}" />

								<property name="bootstrap-version" value="1.0.0" />
								<property name="bootstrap-id" value="bootstrap-${bootstrap-version}.jar" />
								<replace dir="${basedir}/target/gCore/bin" token="bootstrap.jar"
									value="${bootstrap-id}" />

								<property name="cog-version" value="1.0.0" />
								<property name="cog-id" value="cog-url-${cog-version}.jar" />
								<replace dir="${basedir}/target/gCore/bin" token="cog-url.jar"
									value="${cog-id}" />

								<property name="axis-url-version" value="1.2.6" />
								<property name="axis-url-id" value="axis-url-${axis-url-version}.jar" />
								<replace dir="${basedir}/target/gCore/bin" token="axis-url.jar"
									value="${axis-url-id}" />
								<chmod perm="755">
									<fileset dir="${basedir}/target/gCore/bin">
										<include name="*" />
									</fileset>
								</chmod>
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<appendAssemblyId>false</appendAssemblyId>
					<descriptors>
						<descriptor>distro/descriptor.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<id>nosec</id>
						<phase>install</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.gcube.distribution</groupId>
				<artifactId>maven-bom</artifactId>
				<version>LATEST</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<properties>
		<distroDirectory>distro</distroDirectory>
	</properties>


	<dependencies>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>ghn-distribution-bundle</artifactId>
			<version>3.8.0-2.17.2</version>
			<classifier>bundle</classifier>
			<type>tar.gz</type>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ant</groupId>
			<artifactId>ant</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.tigris.antelope</groupId>
			<artifactId>antelopetasks</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>xml-resolver</groupId>
			<artifactId>xml-resolver</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>axis</groupId>
			<artifactId>axis-saaj</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>axis</groupId>
			<artifactId>axis-jaxrpc</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>xml-security</groupId>
			<artifactId>xmlsec</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>xalan</groupId>
			<artifactId>xalan</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>commons-digester</groupId>
			<artifactId>commons-digester</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>naming-resources</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>naming-factory</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>naming-common</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>cryptix32</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.objenesis</groupId>
			<artifactId>objenesis</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>concurrent</groupId>
			<artifactId>concurrent</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.glassfish.web</groupId>
			<artifactId>javax.servlet.jsp</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>xfire</groupId>
			<artifactId>opensaml</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>net.sf.kxml</groupId>
			<artifactId>kxml2</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>xfire</groupId>
			<artifactId>wss4j</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jsr173_api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>jaxen</groupId>
			<artifactId>jaxen</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>antlr</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ant</groupId>
			<artifactId>ant-launcher</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>axis-patched</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>wsrf-core</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>wsrf-tools</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>wsrf-core-stubs</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>cog-jglobus</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>cog-axis</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>ws-addressing</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>gcube-provider</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>commonj</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>axis-url</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>wsdl4j</groupId>
			<artifactId>wsdl4j</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>xml-apis</groupId>
			<artifactId>xml-apis</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>commons-cli</groupId>
			<artifactId>commons-cli</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>commons-discovery</groupId>
			<artifactId>commons-discovery</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>cog-tomcat</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>cog-url</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>puretls</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>cryptix-asn</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>cryptix</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>globus-usage-core</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>globus-usage-packets-common</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>globus-wsrf-mds-aggregator</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>globus-wsrf-mds-aggregator-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>globus-wsrf-servicegroup</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>globus-wsrf-servicegroup_stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>wsrf_common</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>wsrf-mds-index-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>wsrf-mds-index</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>wsrf-mds-usefulrp</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>wsrf-test</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>wsrf-mds-usefulrp-schema-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>wsrf-provider-jce</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>glite-security-util-java</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcprov-jdk14</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bouncycastle-jce-jdk13</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>jgss</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>bootstrap</artifactId>
			<scope>provided</scope>
		</dependency>
		<!-- GHN dep -->
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>gcf</artifactId>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<artifactId>ghn-core-runtime</artifactId>
					<groupId>org.gcube.distribution</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-scope</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.jms</groupId>
			<artifactId>jms-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.execution</groupId>
			<artifactId>grs2library</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.execution</groupId>
			<artifactId>madgikcommonslibrary</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.informationsystem</groupId>
			<artifactId>is-collector-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.informationsystem</groupId>
			<artifactId>is-client</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.informationsystem</groupId>
			<artifactId>is-notification</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.informationsystem</groupId>
			<artifactId>is-publisher</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.informationsystem</groupId>
			<artifactId>notifier-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.informationsystem</groupId>
			<artifactId>is-registry-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.messaging</groupId>
			<artifactId>accounting-node</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.messaging</groupId>
			<artifactId>messages</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.messaging</groupId>
			<artifactId>producer</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.search</groupId>
			<artifactId>resultsetclientlibrary</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.search</groupId>
			<artifactId>resultsetgarbagecollector</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.search</groupId>
			<artifactId>resultsetlibrary</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.search</groupId>
			<artifactId>resultsetservice-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resourcemanagement</groupId>
			<artifactId>deployer-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resourcemanagement</groupId>
			<artifactId>ghnmanager-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resourcemanagement</groupId>
			<artifactId>ghnmanager-test-suite</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resourcemanagement</groupId>
			<artifactId>resource-manager-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resourcemanagement</groupId>
			<artifactId>softwaregateway-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resourcemanagement</groupId>
			<artifactId>virtualplatformlibray</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>backport-util-concurrent</groupId>
			<artifactId>backport-util-concurrent</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>naming-java</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.thoughtworks.xstream</groupId>
			<artifactId>xstream</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>active-mq</groupId>
			<artifactId>activemq-core</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>geronimo-spec</groupId>
			<artifactId>geronimo-spec-j2ee-management</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>asm</groupId>
			<artifactId>asm</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>javax.servlet.jsp-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>dom4j</groupId>
			<artifactId>dom4j</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>jdom</groupId>
			<artifactId>jdom</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>xom</groupId>
			<artifactId>xom</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.ibm.icu</groupId>
			<artifactId>icu4j</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.ccil.cowan.tagsoup</groupId>
			<artifactId>tagsoup</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>xpp3</groupId>
			<artifactId>xpp3_min</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-configuration-scanner</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resources</groupId>
			<artifactId>common-gcore-resources</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-gcore-stubs</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resources.discovery</groupId>
			<artifactId>discovery-client</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resources.discovery</groupId>
			<artifactId>ic-client</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>messaging-endpoint</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.search</groupId>
			<artifactId>resultsetservice</artifactId>
			<scope>provided</scope>
			<type>gar</type>
		</dependency>
		<dependency>
			<groupId>org.gcube.resourcemanagement</groupId>
			<artifactId>deployer-service</artifactId>
			<scope>provided</scope>
			<type>gar</type>
		</dependency>
		<dependency>
			<groupId>org.gcube.resourcemanagement</groupId>
			<artifactId>ghnmanager-service</artifactId>
			<scope>provided</scope>
			<type>gar</type>
		</dependency>
	</dependencies>
</project>
