<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>io.github.erroraway</groupId>
	<artifactId>sonar-erroraway-plugin-parent</artifactId>
	<version>2.2.5</version>
	<packaging>pom</packaging>

	<name>Error Away SonarQube plugin</name>
	<description>Analyze Java Code with ErrorProne, NullAway, errorprone-slf4j and Picnic Error Prone Support</description>
	<url>https://github.com/erroraway/sonar-erroraway-plugin</url>
	
	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/erroraway/sonar-erroraway-plugin/issues</url>
	</issueManagement>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<url>https://github.com/erroraway/sonar-erroraway-plugin.git</url>
	</scm>

	<developers>
		<developer>
			<id>gtoison</id>
			<name>Guillaume Toison</name>
		</developer>
	</developers>

	<properties>
		<sonar.server.version>9.9.9.104369</sonar.server.version>
		<sonar-ws.version>25.4.0.105899</sonar-ws.version>
		<sonar-plugin-api.version>9.14.0.375</sonar-plugin-api.version>
		<sonar-commons-analyzers.version>1.10.2.456</sonar-commons-analyzers.version>
		<sonar-java-frontend.version>8.2.0.36672</sonar-java-frontend.version>
		<sonar-orchestrator.version>5.6.0.2578</sonar-orchestrator.version>

		<errorprone.version>2.42.0</errorprone.version>
		<nullaway.version>0.12.7</nullaway.version>
		<errorprone.slf4j.version>0.1.29</errorprone.slf4j.version>
		<picnic.errorprone.support.version>0.25.0</picnic.errorprone.support.version>
		
		<protobuf.version>4.30.1</protobuf.version>
		
		<commonmark.version>0.20.0</commonmark.version>
		
		<org.json.version>20231013</org.json.version>
		<gson.version>2.8.9</gson.version>
		
		<junit.version>5.10.1</junit.version>
		<mockito.version>4.5.1</mockito.version>
		<assertj.version>3.21.0</assertj.version>
		
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<sonar.organization>erroraway</sonar.organization>
		<sonar.host.url>https://sonarcloud.io</sonar.host.url>

		<errorproneArgLine> --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</errorproneArgLine>
	</properties>
	
	<modules>
		<module>sonar-erroraway-lib</module>
		<module>sonar-erroraway-maven-plugin</module>
		<module>sonar-erroraway-sonar-plugin</module>
	</modules>
	
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
					<source>17</source>
					<target>17</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.0.0-M7</version>
				<configuration>
					<argLine>${surefireArgLine} ${errorproneArgLine}</argLine>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.11</version>
				<executions>
					<execution>
						<id>prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<propertyName>surefireArgLine</propertyName>
						</configuration>
					</execution>
					<execution>
						<id>report</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
						<configuration>
							<formats>
								<format>XML</format>
							</formats>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>	
	
	<profiles>
		<profile>
			<id>deploy</id>

			<build>
				<plugins>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.4</version>
						<executions>
							<execution>
								<id>attach-source</id>
								<phase>compile</phase>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.3.1</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<!-- Prevent gpg from using pinentry programs -->
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
						<version>0.8.0</version>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>central</publishingServerId>
							<autoPublish>true</autoPublish>
							<waitUntil>published</waitUntil>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<distributionManagement>
		<snapshotRepository>
			<id>central</id>
			<url>https://central.sonatype.com/repository/maven-snapshots</url>
		</snapshotRepository>
	</distributionManagement>
</project>