<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.8.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>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</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.13.1</antlr.version>
		<altDeploymentRepository>local::file:./target/staging-deploy</altDeploymentRepository>
	</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.10.0</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>2.0.12</version>
			</dependency>

			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-slf4j2-impl</artifactId>
				<version>2.23.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-core</artifactId>
				<version>2.23.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.13</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>2.4.0</version>
				<scope>test</scope>
			</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>11.1.1</version>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<nvdApiServerId>nvd</nvdApiServerId>
					<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>
					<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> &lt;!&ndash; see if this works instead of verify &ndash;&gt;-->
<!--						<goals>-->
<!--							<goal>sign</goal>-->
<!--						</goals>-->
<!--					</execution>-->
<!--				</executions>-->
<!--			</plugin>-->

<!--			&lt;!&ndash; deploy using the special nexus-staging deploy plugin &ndash;&gt;-->
<!--			<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>-->

<!--			&lt;!&ndash; release plugin handles validation and versioning, use release:prepare -->
<!--				and release:perform &ndash;&gt;-->
<!--			<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>-->

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>3.0.0</version>
			</plugin>
			<!-- https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_maven_example -->
			<plugin>
				<groupId>org.jreleaser</groupId>
				<artifactId>jreleaser-maven-plugin</artifactId>
				<version>1.8.0</version>
				<configuration>
					<jreleaser>
						<signing>
							<active>ALWAYS</active>
							<armored>true</armored>
						</signing>
						<release>
							<github>
								<overwrite>true</overwrite>
							</github>
						</release>
						<deploy>
							<maven>
								<nexus2>
									<maven-central>
										<active>ALWAYS</active>
										<snapshotUrl>https://oss.sonatype.org/content/repositories/snapshots</snapshotUrl>
										<url>https://oss.sonatype.org/service/local</url>
										<closeRepository>true</closeRepository> <!-- false, see release.txt -->
										<releaseRepository>true</releaseRepository> <!-- false, see release.txt -->
										<stagingRepositories>target/staging-deploy</stagingRepositories>
									</maven-central>
								</nexus2>
							</maven>
						</deploy>
					</jreleaser>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
