<?xml version="1.0" encoding="UTF-8"?>
<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.aposin.licensescout</groupId>
		<artifactId>org.aposin.licensescout.parent</artifactId>
		<version>1.3.0</version>
		<relativePath>../org.aposin.licensescout.parent/</relativePath>
	</parent>

	<groupId>org.aposin.licensescout</groupId>
	<artifactId>licensescout-maven-plugin</artifactId>
	<packaging>maven-plugin</packaging>

	<name>LicenseScout Maven Plugin</name>
	<description>Finds license information and collects them to a license report.</description>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>

	<prerequisites>
		<maven>3.3.0</maven>
	</prerequisites>

	<scm>
		<url>https://github.com/aposin/LicenseScout</url>
		<connection>scm:git:git://github.com/aposin/LicenseScout.git</connection>
		<developerConnection>scm:git:git@aposin/LicenseScout.git</developerConnection>
	</scm>


	<dependencies>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-model</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
		</dependency>
		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-utils</artifactId>
		</dependency>
		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-collections4</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.velocity</groupId>
			<artifactId>velocity-engine-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.mariadb.jdbc</groupId>
			<artifactId>mariadb-java-client</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- groupId: org.apache.maven.plugins -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<addMavenDescriptor>true</addMavenDescriptor>
					</archive>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<configuration>
					<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>

			<!-- NOTE: disabled because of CI build error <plugin> <groupId>org.apache.maven.plugins</groupId> 
				<artifactId>maven-source-plugin</artifactId> </plugin> -->
			<!-- groupId: org.jacoco -->
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<!-- attached to Maven test phase -->
					<execution>
						<id>report</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- groupId: com.mycila -->
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<configuration>
					<header>LICENSE_header.txt</header>
					<properties>
						<year>2019</year>
						<owner>${project.organization.name}</owner>
					</properties>
					<includes>
						<!-- include all sources -->
						<include>src/**</include>
					</includes>
					<excludes>
						<exclude>**/*.xml</exclude>
						<exlucde>**/*.txt</exlucde>
						<exclude>**/*.csv</exclude>
					</excludes>
				</configuration>
			</plugin>

		</plugins>

	</build>

	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>

			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
						<configuration>
							<localCheckout>true</localCheckout>
							<pushChanges>false</pushChanges>
							<mavenExecutorId>forked-path</mavenExecutorId>
							<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
						</configuration>
						<dependencies>
							<dependency>
								<groupId>org.apache.maven.scm</groupId>
								<artifactId>maven-scm-provider-gitexe</artifactId>
								<version>1.9.5</version>
							</dependency>
						</dependencies>
					</plugin>

					<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> 
						</plugin> -->
				</plugins>
			</build>
		</profile>


	</profiles>

</project>
