<?xml version="1.0" encoding="UTF-8"?>
<!-- vi:ts=2:sw=2:expandtab: -->
<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 -->
	<parent>
		<groupId>org.jboss</groupId>
		<artifactId>jboss-parent</artifactId>
		<version>6-beta-2</version>
		<relativePath />
	</parent>

	<!-- Model Information -->
	<modelVersion>4.0.0</modelVersion>

	<!-- Artifact Information -->
	<groupId>com.openshift</groupId>
	<artifactId>openshift-java-client</artifactId>
	<version>2.5.0.Final</version>
	<packaging>jar</packaging>
	<name>OpenShift Java Client</name>
	<url>http://openshift.redhat.com</url>
	<description>OpenShift Java Client</description>

	<properties>

		<!-- Explicitly declaring the source encoding eliminates the following message: -->
        <!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- jboss-parent override -->
		<version.release.plugin>2.1</version.release.plugin>
		<maven.compiler.target>1.6</maven.compiler.target>
		<maven.compiler.source>1.6</maven.compiler.source>


		<!-- External Deps -->
		<version.shrinkwrap_shrinkwrap>1.0.0-beta-6</version.shrinkwrap_shrinkwrap>
		<version.shrinkwrap_resolver>1.0.0-beta-5</version.shrinkwrap_resolver>
		<version.shrinkwrap_descriptors>1.1.0-beta-1</version.shrinkwrap_descriptors>
		
		<!-- integration test properties file -->
		<integrationtest.properties>${basedir}/src/test/resources/integrationTest.properties</integrationtest.properties>

	</properties>

	<!-- Issues -->
	<issueManagement>
		<system>jira</system>
		<url>http://jira.jboss.com/jira/browse/JBIDE</url>
	</issueManagement>

	<!-- Licenses -->
	<licenses>
		<license>
			<name>Eclipse Public License v1.0</name>
			<url>http://www.eclipse.org/legal/epl-v10.html</url>
		</license>
	</licenses>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
		<plugins>
			<!-- read integration test properties -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>properties-maven-plugin</artifactId>
				<version>1.0-alpha-1</version>
				<executions>
					<execution>
						<phase>initialize</phase>
						<goals>
							<goal>read-project-properties</goal>
						</goals>
						<configuration>
							<files>
								<file>${integrationtest.properties}</file>
							</files>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.12</version>
				<configuration>
			        <argLine>-Dfile.encoding=UTF-8</argLine>
					<systemPropertyVariables>
						<libra_server>${libra_server}</libra_server>
						<default_rhlogin>${default_rhlogin}</default_rhlogin>
						<rhpassword>${rhpassword}</rhpassword>
						<https.proxyHost>${proxyHost}</https.proxyHost>
						<https.proxyPort>${proxyPort}</https.proxyPort>
						<http.proxyHost>${proxyHost}</http.proxyHost>
						<http.proxyPort>${proxyPort}</http.proxyPort>
          			</systemPropertyVariables>
					<excludes>
						<exclude>**/OpenShiftIntegrationTestSuite.java</exclude>
					</excludes>
					<includes>
						<include>**/OpenShiftTestSuite.java</include>
					</includes>
					<!--excludes> <exclude>**/OpenShiftTestSuite.java</exclude> </excludes> 
						<includes> <include>**/OpenShiftIntegrationTestSuite.java</include> </includes -->
					<!--jvm>/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java</jvm -->
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.4</version>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>org.jboss</groupId>
			<artifactId>jboss-dmr</artifactId>
			<version>1.0.0.Final</version>
		</dependency>
		<dependency>
			<groupId>com.jcraft</groupId>
			<artifactId>jsch</artifactId>
			<version>0.1.44-1</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>1.9.0-rc1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.easytesting</groupId>
			<artifactId>fest-assert</artifactId>
			<version>1.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.6.4</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.6.4</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.16</version>
		</dependency>
	</dependencies>


	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-release-plugin</artifactId>
						<configuration>
							<autoVersionSubmodules>true</autoVersionSubmodules>
							<pushChanges>false</pushChanges>
							<localCheckout>true</localCheckout>
						</configuration>
					</plugin>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<doclet>org.jboss.apiviz.APIviz</doclet>
							<docletArtifact>
								<groupId>org.jboss.apiviz</groupId>
								<artifactId>apiviz</artifactId>
								<version>1.3.1.GA</version>
							</docletArtifact>
							<useStandardDocletOptions>true</useStandardDocletOptions>
							<charset>UTF-8</charset>
							<encoding>UTF-8</encoding>
							<docencoding>UTF-8</docencoding>
							<breakiterator>true</breakiterator>
							<version>true</version>
							<author>true</author>
							<keywords>true</keywords>
							<additionalparam>-sourceclasspath
								${project.build.outputDirectory}</additionalparam>
							<stylesheetfile>${project.parent.parent.basedir}/javadoc/stylesheet.css</stylesheetfile>
							<javadocDirectory>${project.parent.parent.basedir}/javadoc</javadocDirectory>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- profile is enabled in Jenkins by -Daxis=defaultprofile -->
		<profile>
			<id>defaultprofile</id>
			<activation>
				<property>
					<name>axis</name>
					<value>defaultprofile</value>
				</property>
			</activation>
			<properties>
				<defaultprofile>true</defaultprofile>
			</properties>
		</profile>

		<!-- profile is enabled in Jenkins by -Daxis=integration-tests -->
		<profile>
			<id>integration-tests</id>
			<activation>
				<property>
					<name>axis</name>
					<value>integration-tests</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>2.12</version>
						<configuration>
							<systemPropertyVariables>
								<libra_server>${libra_server}</libra_server>
								<default_rhlogin>${default_rhlogin}</default_rhlogin>
								<rhpassword>${rhpassword}</rhpassword>
                <https.proxyHost>${proxyHost}</https.proxyHost>
                <https.proxyPort>${proxyPort}</https.proxyPort>
                <http.proxyHost>${proxyHost}</http.proxyHost>
                <http.proxyPort>${proxyPort}</http.proxyPort>
                <proxyHost>${proxyHost}</proxyHost>
                <proxyPort>${proxyPort}</proxyPort>
              </systemPropertyVariables>
							<excludes>
								<exclude>**/OpenShiftSuite.java</exclude>
							</excludes>
							<includes>
								<include>**/OpenShiftIntegrationTestSuite.java</include>
							</includes>
              <forkMode>none</forkMode>
						</configuration>
						<executions>
							<execution>
								<id>integration-tests</id>
								<phase>integration-test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<skip>false</skip>
									<excludes>
										<exclude>none</exclude>
									</excludes>
									<includes>
										<include>**/integration/*Test.java</include>
									</includes>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

	</profiles>
</project>
