<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>
	<groupId>de.calamanari.adl</groupId>
	<artifactId>audlang-spec</artifactId>
	<packaging>jar</packaging>
	<version>1.0.4</version>
	<name>Audlang Specification</name>
	<description>Audience Definition Language Specification</description>
    <url>https://github.com/KarlEilebrecht/audlang-spec</url>
    
	<!-- 
		This is primarily a specification project (zip-artifact with ANTLR-grammar)
	independent from any programming language.
		The supplementary jar created by this maven built is required to validate the
	grammar against
		a large number of generated samples.
	-->

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

    <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>
	
	<developers>
	    <developer>
	        <name>Karl Eilebrecht</name>
	        <email>Karl.Eilebrecht@calamanari.de</email>
	        <organization>KarlEilebrecht</organization>
	    </developer>
	</developers>


	<scm>
		<connection>scm:git:https://github.com/KarlEilebrecht/audlang-spec.git</connection>
		<developerConnection>
			scm:git:https://github.com/KarlEilebrecht/audlang-spec.git</developerConnection>
		<url>https://github.com/KarlEilebrecht/audlang-spec</url>
		<tag>v1.0.4</tag>
	</scm>


	<dependencies>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>antlr4-runtime</artifactId>
			<version>4.13.2</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.5.16</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>2.1.0-alpha1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>2.18.2</version>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<version>5.11.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>5.11.4</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.antlr</groupId>
				<artifactId>antlr4-maven-plugin</artifactId>
				<version>4.13.2</version>
				<configuration>
					<arguments>
						<argument>-package</argument>
						<argument>de.calamanari.adl.antlr</argument>
						<argument>-o</argument>
						<argument>
							target/generated-sources/antlr4/de/calamanari/adl/antlr</argument>
					</arguments>
				</configuration>
				<executions>
					<execution>
						<id>antlr</id>
						<goals>
							<goal>antlr4</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.11.2</version>
				<configuration>
					<show>protected</show>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>				
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.13.0</version>
				<configuration>
					<release>21</release>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.3.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.12</version>
				<configuration>
					<excludes>
						<exclude>**/Audlang*.*</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.5.2</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>3.7.1</version>
				<executions>
					<execution>
						<id>create-spec-zip</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptors>
								<descriptor>src/main/assembly/zip.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>3.1.1</version>
				<configuration>
					<tagNameFormat>v@{project.version}</tagNameFormat>
				</configuration>
			</plugin>
		    <plugin>
		        <groupId>org.simplify4u.plugins</groupId>
		        <artifactId>sign-maven-plugin</artifactId>
		        <version>1.1.0</version>
		        <executions>
		            <execution>
		                <goals>
		                    <goal>sign</goal>
		                </goals>
		            </execution>
		        </executions>
		    </plugin>			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>3.1.3</version>
			</plugin>
		</plugins>
	</build>


	<profiles>
		<profile>
			<id>github</id>
			<distributionManagement>
				<repository>
                    <!-- This matches the ID in the settings.xml to find the credentials -->				
					<id>audlang-spec</id>
					<name>GitHub KarlEilebrecht Apache Maven Packages</name>
					<url>
						https://maven.pkg.github.com/KarlEilebrecht/audlang-spec</url>
				</repository>
			</distributionManagement>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
		</profile>
		<profile>
			<id>mavenCentral</id>
			<build>
			    <plugins>
			        <plugin>
			          <groupId>org.sonatype.central</groupId>
			          <artifactId>central-publishing-maven-plugin</artifactId>
			          <version>0.7.0</version>
			          <extensions>true</extensions>
			          <configuration>
			             <publishingServerId>central</publishingServerId>
			             <autoPublish>true</autoPublish>
			          </configuration>
			        </plugin>
			    </plugins>
			</build>			
			<distributionManagement>
				<repository>
					<id>central</id>
					<name>Maven Central Repository OSSRH</name>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>
		</profile>
	</profiles>

</project>