
<!-- ==========================================================================  -->
<!-- Copyright © 2015-2019 Cristiano Gavião, C8 Technology ME.                         -->
<!--                                                                             -->
<!-- All rights reserved. This program and the accompanying materials            -->
<!-- are made available under the terms of the Eclipse Public License v1.0       -->
<!-- which accompanies this distribution, and is available at                    -->
<!-- http://www.eclipse.org/legal/epl-v10.html                                   -->
<!--                                                                             -->
<!-- Contributors:                                                               -->
<!-- Cristiano Gavião (cvgaviao@c8tech.com.br)- initial API and implementation   -->
<!-- ==========================================================================  -->

<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>br.com.c8tech.tools</groupId>
		<artifactId>c8tech-tools-maven-pom</artifactId>
		<version>0.9.0</version>
	</parent>

	<artifactId>osgi-container-maven-plugin</artifactId>
	<name>OSGi Container Distribution Archive Generator Maven Plugin</name>
	<version>0.7.0</version>
	<description>A maven plugin aimed to generate a compressed archive containing an OSGi container structure ready to be used.</description>
	<packaging>maven-plugin</packaging>

	<!-- not inherited, IIRC -->
	<prerequisites>
		<maven>[3.5.4,)</maven>
	</prerequisites>

	<licenses>
		<!-- The Apache License is being added because embedded tools are using 
			this license -->
		<license>
			<name>Apache License 2.0</name>
			<url>http://www.spdx.org/licenses/Apache-2.0</url>
		</license>
		<license>
			<name>Eclipse Public License 1.0</name>
			<url>http://www.spdx.org/licenses/EPL-1.0</url>
		</license>
	</licenses>


	<properties>
		<c8tech.maven.library.version>${project.parent.version}</c8tech.maven.library.version>
		<c8tech.scm.repo.name>osgi-container-maven-plugin</c8tech.scm.repo.name>
		<maven.assembly.version>3.1.1</maven.assembly.version>
		<maven.docker.version>1.4.4</maven.docker.version>
		<docker-client.version>8.16.0</docker-client.version>
	</properties>


	<!-- Due a maven limitation, this MUST be replicated to all children -->
	<url>${c8tech.project.site.url}</url>
	<scm>
		<connection>${c8tech.scm.connection}</connection>
		<developerConnection>${c8tech.scm.connection.dev}</developerConnection>
		<url>${c8tech.scm.url}</url>
		<tag>v0.7.0</tag>
	</scm>
	<distributionManagement>
		<site>
			<id>${c8tech.distribution.site.id}</id>
			<name>${c8tech.distribution.site.name}</name>
			<url>${c8tech.distribution.site.url}</url>
		</site>
	</distributionManagement>
	<!-- end of per child setting -->

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>${mavenPluginPlugin.version}</version>
			</plugin>
		</plugins>
	</reporting>

	<dependencies>
		<dependency>
			<groupId>br.com.c8tech.tools</groupId>
			<artifactId>c8tech.tools.maven.library.mojo</artifactId>
			<version>${c8tech.maven.library.version}</version>
		</dependency>

		<!-- dependencies to mojo annotations -->
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-core</artifactId>
		</dependency>

		<!-- dependencies from assembly -->

		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-archiver</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-artifact</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.shared</groupId>
			<artifactId>maven-artifact-transfer</artifactId>
			<version>0.9.0</version>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-assembly-plugin</artifactId>
			<version>${maven.assembly.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.apache.maven.shared</groupId>
					<artifactId>maven-shared-utils</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.codehaus.plexus</groupId>
					<artifactId>plexus-archiver</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.codehaus.plexus</groupId>
					<artifactId>plexus-utils</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.codehaus.plexus</groupId>
					<artifactId>plexus-interpolation</artifactId>
				</exclusion>
				<exclusion>
					<groupId>commons-codec</groupId>
					<artifactId>commons-codec</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.maven</groupId>
					<artifactId>maven-compat</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.sonatype.sisu</groupId>
					<artifactId>sisu-inject-plexus</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.maven</groupId>
					<artifactId>maven-artifact</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.maven</groupId>
					<artifactId>maven-core</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.maven</groupId>
					<artifactId>maven-model</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.maven.shared</groupId>
					<artifactId>maven-common-artifact-filters</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.maven</groupId>
					<artifactId>maven-plugin-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.maven.shared</groupId>
					<artifactId>maven-artifact-transfer</artifactId>
				</exclusion>
			</exclusions>
		</dependency>


		<!-- dependencies from docker -->

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.8.5</version>
		</dependency>

		<dependency>
			<groupId>com.google.auth</groupId>
			<artifactId>google-auth-library-oauth2-http</artifactId>
			<version>0.15.0</version>
		</dependency>

		<dependency>
			<groupId>com.spotify</groupId>
			<artifactId>docker-client</artifactId>
			<classifier>shaded</classifier>
			<version>${docker-client.version}</version>
		</dependency>

		<!-- dependencies for testing -->
		<dependency>
			<groupId>io.takari.maven.plugins</groupId>
			<artifactId>takari-plugin-testing</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>io.takari.maven.plugins</groupId>
			<artifactId>takari-plugin-integration-testing</artifactId>
			<type>pom</type>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.vintage</groupId>
			<artifactId>junit-vintage-engine</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-compat</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>${mavenPluginPlugin.version}</version>
				<configuration>
					<goalPrefix>osgi-container</goalPrefix>
					<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
				</configuration>
				<executions>
					<execution>
						<id>mojo-descriptor</id>
						<goals>
							<goal>descriptor</goal>
						</goals>
					</execution>
					<execution>
						<id>help-goal</id>
						<goals>
							<goal>helpmojo</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.sisu</groupId>
				<artifactId>sisu-maven-plugin</artifactId>
				<version>0.3.3</version>
				<configuration>
					<detail>true</detail>
				</configuration>
				<executions>
					<execution>
						<id>generate-index</id>
						<phase>process-classes</phase>
						<goals>
							<goal>main-index</goal>
							<!-- <goal>test-index</goal> -->
						</goals>
					</execution>
					<execution>
						<id>index-dependencies</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>index</goal>
						</goals>
						<configuration>
							<includeArtifactIds>maven-plugin-plugin,c8tech.tools.maven.library.mojo </includeArtifactIds>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>io.takari.maven.plugins</groupId>
				<artifactId>takari-lifecycle-plugin</artifactId>
				<version>${takari-lifecycle.version}</version>
				<extensions>true</extensions>
				<executions>
					<execution>
						<id>testProperties</id>
						<phase>process-test-resources</phase>
						<goals>
							<goal>testProperties</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
