<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">

	<parent>
		<groupId>org.opengis.cite</groupId>
		<artifactId>ets-common</artifactId>
		<version>9</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.opengis.cite</groupId>
	<artifactId>ets-swecommon20</artifactId>
	<version>1.1</version>
	<packaging>jar</packaging>

	<name>Sensor Web Enablement (SWE) Common Data Model Encoding Standard</name>
	<description>Describe purpose of test suite.</description>
	<url>http://opengeospatial.github.io/ets-swecommon20/</url>
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://opensource.org/licenses/Apache-2.0</url>
		</license>
	</licenses>

	<organization>
		<name>Open Geospatial Consortium</name>
		<url>http://www.opengeospatial.org/</url>
	</organization>
	<scm>
		<connection>scm:git:https://github.com/opengeospatial/ets-swecommon20.git</connection>
		<developerConnection>scm:git:git@github.com:opengeospatial/ets-swecommon20.git</developerConnection>
		<url>https://github.com/opengeospatial/ets-swecommon20</url>
		<tag>1.1</tag>
	</scm>
	<issueManagement>
		<system>GitHub Issue Tracker</system>
		<url>https://github.com/opengeospatial/ets-swecommon20/issues</url>
	</issueManagement>
	<developers>
		<developer>
			<name>Huy Nguyen</name>
			<url>HuyQuoc2311@gmail.com</url>
			<timezone>UTC</timezone>
		</developer>
	</developers>

	<properties>
		<ets-code>swecommon20</ets-code>
		<spec-version>2.0</spec-version>
		<docker.teamengine.version>5.4.1</docker.teamengine.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.opengis.cite.teamengine</groupId>
			<artifactId>teamengine-spi</artifactId>
			<version>5.3.1</version>
		</dependency>
		<dependency>
			<groupId>org.opengis.cite</groupId>
			<artifactId>schema-utils</artifactId>
			<version>1.8</version>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-client</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.1</version>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>2.27.0</version>
		</dependency>
		<dependency>
		    <groupId>org.testng</groupId>
		    <artifactId>testng</artifactId>
		    <version>6.9.10</version>
		</dependency>
		<dependency>
		    <groupId>org.opengis.cite.saxon</groupId>
		    <artifactId>saxon9</artifactId>
		    <version>9.0.0.8</version>
		</dependency>
		<dependency>
		    <groupId>xml-apis</groupId>
		    <artifactId>xml-apis</artifactId>
		    <version>1.4.01</version>
		</dependency>
		<dependency>
		    <groupId>xerces</groupId>
		    <artifactId>xercesImpl</artifactId>
		    <version>2.12.2</version>
		</dependency>
		<dependency>
		    <groupId>javax.ws.rs</groupId>
		    <artifactId>jsr311-api</artifactId>
		    <version>1.1.1</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.1.0</version>
				<configuration>
					<docfilessubdirs>true</docfilessubdirs>
					<show>package</show>
					<links>
						<link>http://testng.org/javadocs/</link>
					</links>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.0.0-M3</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.1.1</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>3.1.1</version>
				<configuration>
					<archive>
						<manifest>
							<mainClass>org.opengis.cite.swecommon20.TestNGController</mainClass>
						</manifest>
					</archive>
					<descriptors>
						<descriptor>${basedir}/src/assembly/deps.xml</descriptor>
						<descriptor>${basedir}/src/assembly/ctl-scripts.xml</descriptor>
						<descriptor>${basedir}/src/assembly/aio.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<tagNameFormat>@{project.version}</tagNameFormat>
					<releaseProfiles>release</releaseProfiles>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.7.1</version>
			</plugin>
			<!-- <plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>buildnumber-maven-plugin</artifactId>
				<version>1.4</version>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>create</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<doCheck>false</doCheck>
					<doUpdate>true</doUpdate>
				</configuration>
			</plugin> -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-scm-publish-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<scmBranch>gh-pages</scmBranch>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>docker</id>
			<build>
				<plugins>
					<plugin>
						<groupId>io.fabric8</groupId>
						<artifactId>docker-maven-plugin</artifactId>
						<version>0.30.0</version>
						<configuration>
							<images>
								<image>
									<name>opengeospatial/${project.artifactId}</name>
									<build>
										<dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
										<tags>
											<tag>${project.version}-teamengine-${docker.teamengine.version}</tag>
										</tags>
										<assembly>
											<inline>
												<fileSets>
													<fileSet>
														<directory>${project.build.directory}</directory>
														<outputDirectory>.</outputDirectory>
														<includes>
															<include>dependency/*teamengine-*.war</include>
															<include>dependency/*teamengine-*.zip</include>
															<include>*ets-*.zip</include>
														</includes>
													</fileSet>
												</fileSets>
											</inline>
										</assembly>
									</build>
									<run>
										<ports>
											<port>8081:8080</port>
										</ports>
										<wait>
											<http>
												<url>http://localhost:8081/teamengine</url>
											</http>
											<time>120000</time>
										</wait>
									</run>
								</image>
							</images>
						</configuration>
						<executions>
							<execution>
								<id>start</id>
								<phase>pre-integration-test</phase>
								<goals>
									<goal>build</goal>
									<goal>start</goal>
								</goals>
							</execution>
							<execution>
								<id>stop</id>
								<phase>post-integration-test</phase>
								<goals>
									<goal>stop</goal>
									<goal>remove</goal>
								</goals>
							</execution>
							<execution>
								<id>build</id>
								<goals>
									<goal>build</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-dependency-plugin</artifactId>
						<version>3.1.1</version>
						<executions>
							<execution>
								<goals>
									<goal>copy-dependencies</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<dependencies>
				<dependency>
					<groupId>org.opengis.cite.teamengine</groupId>
					<artifactId>teamengine-web</artifactId>
					<version>${docker.teamengine.version}</version>
					<type>war</type>
				</dependency>
				<dependency>
					<groupId>org.opengis.cite.teamengine</groupId>
					<artifactId>teamengine-web</artifactId>
					<version>${docker.teamengine.version}</version>
					<classifier>common-libs</classifier>
					<type>zip</type>
				</dependency>
				<dependency>
					<groupId>org.opengis.cite.teamengine</groupId>
					<artifactId>teamengine-console</artifactId>
					<version>${docker.teamengine.version}</version>
					<classifier>base</classifier>
					<type>zip</type>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<!-- Enable if GPG 2.1+ is used -->
									<!--<gpgArguments> <arg>&#45;&#45;pinentry-mode</arg> <arg>loopback</arg>
										</gpgArguments> -->
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<distributionManagement>
		<repository>
			<id>sonatype-nexus-staging</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
		<site>
			<id>site</id>
			<url>scm:git:git@github.com:opengeospatial/ets-swecommon20.git</url>
		</site>
	</distributionManagement>
</project>
