<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>
		<groupId>org.fugerit.java.universe</groupId>
		<artifactId>fj-universe</artifactId>
		<version>2.3.4</version>
	</parent>

	<artifactId>fj-universe-tool</artifactId>
	<packaging>pom</packaging>

	<name>Fugerit universe dependency test module</name>
	<description>This modules use the dependency plugin to copy all the dependencies needed.</description>
	<url>https://github.com/fugerit-org/fj-universe/</url>

	<scm>
		<connection>scm:git:git://github.com/fugerit-org/fj-universe.git</connection>
		<developerConnection>scm:git:ssh://github.com/fugerit-org/fj-universe.git</developerConnection>
		<url>https://github.com/fugerit-org/fj-universe.git</url>
	</scm>

	<properties>
		<!-- override this property if needed -->
		<tool-main-class>tool.Run</tool-main-class>
		<!-- override java-version compliance if needed -->
		<maven.compiler.release>${java-version-compliance}</maven.compiler.release>
	</properties>

	<dependencies>
		
		<dependency>
			<groupId>org.fugerit.java</groupId>
			<artifactId>fj-core</artifactId>
		</dependency>	
		
		<dependency>
		    <groupId>org.fugerit.java</groupId>
		    <artifactId>fj-tool-util</artifactId>
		</dependency>			

		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>provided</scope>
		</dependency>
		
		<dependency>
		    <groupId>org.fugerit.java</groupId>
		    <artifactId>fj-tool-helper</artifactId>
		    <scope>test</scope>
		</dependency>	
		
		<dependency>
		    <groupId>org.slf4j</groupId>
		    <artifactId>slf4j-simple</artifactId>
		    <scope>test</scope>
		</dependency>	
		
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<profiles>

		<profile>
			<id>singlepackage</id>
			<dependencies>
				<dependency>
					<groupId>org.apache.logging.log4j</groupId>
				    <artifactId>log4j-api</artifactId>
				</dependency>
				<dependency>
				    <groupId>org.apache.logging.log4j</groupId>
				    <artifactId>log4j-core</artifactId>
				</dependency>
				<dependency>
					<groupId>org.apache.logging.log4j</groupId>
				    <artifactId>log4j-slf4j2-impl</artifactId>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<configuration>
							<archive>
								<manifest>
									<addClasspath>true</addClasspath>
									<mainClass>${tool-main-class}</mainClass>
								</manifest>
							</archive>
						</configuration>
					</plugin>
					<plugin>
		                <groupId>org.codehaus.mojo</groupId>
		                <artifactId>build-helper-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>add-resource</id>
								<phase>generate-resources</phase>
								<goals>
									<goal>add-resource</goal>
								</goals>
								<configuration>
									<resources>
										<resource>
											<directory>src/main/config</directory>
											<targetPath>.</targetPath>
											<includes>
												<include>**/*.xml</include>
											</includes>
										</resource>
									</resources>
								</configuration>
							</execution>
						</executions>
		            </plugin>		
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-shade-plugin</artifactId>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>shade</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<finalName>dist-${project.artifactId}-${project.version}</finalName>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

	</profiles>

</project>
