<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.tbee.tecl</groupId>
	<artifactId>tecl-parent</artifactId>
	<version>1.5.0</version>
	<packaging>pom</packaging>

	<!-- https://blog.sonatype.com/2010/01/how-to-generate-pgp-signatures-with-maven/ -->
	<!-- https://central.sonatype.org/pages/apache-maven.html -->
	<name>TECL - totally encompassing configuration language</name>
	<description>A language parser specifically aimed at configuration files, trying to solve the issues found in XML, JSON, YAML, etc.</description>
	<url>https://bitbucket.org/tbee/tecl</url>
	<licenses>
		<license>
			<name>MIT</name>
			<url>https://opensource.org/licenses/MIT</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<scm>
		<connection>scm:git:https://tbee@bitbucket.org/tbee/tecl.git</connection>
		<developerConnection>scm:git:https://tbee@bitbucket.org/tbee/tecl.git</developerConnection>
		<url>https://bitbucket.org/tbee/tecl.git</url>
		<tag>r1.4.1</tag>
	</scm>
	<developers>
		<developer>
			<name>Tom Eugelink</name>
			<email>tbee@tbee.org</email>
		</developer>
	</developers>
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<modules>
		<module>tecl</module>
	</modules>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.release>11</maven.compiler.release>
		<maven.compiler.source>11</maven.compiler.source>
		<maven.compiler.target>11</maven.compiler.target>
		<project.scm.id>bitbucket</project.scm.id>
		<junit.jupiter.version>5.3.1</junit.jupiter.version>
		<antlr.version>4.9.3</antlr.version>
		<slf4j.version>1.7.28</slf4j.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.antlr</groupId>
				<artifactId>antlr4</artifactId>
				<version>${antlr.version}</version>
			</dependency>
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>26.0-jre</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>3.8.1</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-text</artifactId>
				<version>1.8</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-log4j12</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.13</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>2.4.0</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.owasp</groupId>
				<artifactId>dependency-check-maven</artifactId>
				<version>6.5.3</version>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<failBuildOnCVSS>0</failBuildOnCVSS>
				</configuration>
			</plugin>

			<!-- license headers -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>2.0.0</version>
				<configuration>
					<inceptionYear>2020</inceptionYear>
					<organizationName>Tom Eugelink</organizationName>
					<projectName>TECL</projectName>
					<licenseName>mit</licenseName>
				</configuration>
				<executions>
					<execution>
						<id>update-file-header</id>
						<phase>process-sources</phase>
						<goals>
							<goal>update-file-header</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- attach source -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- attach javadoc -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.2.0</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<additionalparam>-Xdoclint:none</additionalparam>
					<additionalJOption>-Xdoclint:none</additionalJOption>
				</configuration>
			</plugin>

			<!-- sign the jars files; the credentials are in .m2/settings.xml, the 
				key itself is shown by the gpg list-keys command -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.6</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>deploy</phase> <!-- see if this works instead of verify -->
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- deploy using the special nexus-staging deploy plugin -->
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>sonatype</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>

			<!-- release plugin handles validation and versioning, use release:prepare 
				and release:perform -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<tagNameFormat>r@{project.version}</tagNameFormat>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<releaseProfiles>releases</releaseProfiles>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
