<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>
	<groupId>com.xxxcom.xxxproduct</groupId>
	<artifactId>xxx-srv</artifactId>
	<version>1.0.0-SNAPSHOT</version>

	<properties>
		<!-- the main verticle class name -->
		<main.verticle>com.xxxcom.xxxproduct.XXXSrv</main.verticle>
		<vertx.version>3.4.2</vertx.version>
	</properties>


	<dependencies>

		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-core</artifactId>
			<version>${vertx.version}</version>
		</dependency>

		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-hazelcast</artifactId>
			<version>${vertx.version}</version>
		</dependency>

		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-web</artifactId>
			<version>${vertx.version}</version>
		</dependency>
		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-redis-client</artifactId>
			<version>${vertx.version}</version>
		</dependency>

		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-mysql-postgresql-client</artifactId>
			<version>3.5.0</version>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.4</version>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<version>2.8</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.23</version>
		</dependency>

		<!-- tag::db-deps[] -->
		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-jdbc-client</artifactId>
			<version>3.1.0</version>
		</dependency>
		<dependency>
			<groupId>postgresql</groupId>
			<artifactId>postgresql</artifactId>
			<version>9.1-901.jdbc4</version>
		</dependency>
		<!-- end::db-deps[] -->

		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-mongo-service</artifactId>
			<version>3.3.0</version>
		</dependency>
		<dependency>
			<groupId>io.vertx</groupId>
			<artifactId>vertx-config</artifactId>
			<version>3.4.0</version>
		</dependency>
		<dependency>
		    <groupId>com.google.code.gson</groupId>
		    <artifactId>gson</artifactId>
		    <version>2.8.2</version>
</dependency>
                                    	
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<!-- We specify the Maven compiler plugin as we need to set it to Java 
					1.8 -->
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.1</version>
					<configuration>
						<source>1.8</source>
						<target>1.8</target>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<!-- You only need the part below if you want to build your application 
			into a fat executable jar. This is a jar that contains all the dependencies 
			required to run it, so you can just run it with java -jar -->
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.3</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<transformers>
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<manifestEntries>
										<Main-Class>io.vertx.core.Launcher</Main-Class>
										<Main-Verticle>${main.verticle}</Main-Verticle>
									</manifestEntries>
								</transformer>
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
									<resource>META-INF/services/io.vertx.core.spi.VerticleFactory</resource>
								</transformer>
							</transformers>
							<artifactSet>
							</artifactSet>
							<outputFile>${project.build.directory}/${project.artifactId}-${project.version}-fat.jar</outputFile>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.4.0</version>
				<executions>
					<execution>
						<id>run</id>
						<goals>
							<goal>java</goal>
						</goals>
						<configuration>
							<mainClass>io.vertx.core.Launcher</mainClass>
							<arguments>
								<argument>run</argument>
								<argument>${main.verticle}</argument>
							</arguments>
						</configuration>
					</execution>

					<execution>
						<id>run-app</id>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>java</executable>
							<arguments>
								<argument>-jar</argument>
								<argument>target/${project.artifactId}-${project.version}-fat.jar</argument>
							</arguments>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>staging</id>
			<repositories>
				<repository>
					<id>staging</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
				</repository>
			</repositories>
		</profile>
	</profiles>
</project>