<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<artifactId>script-security</artifactId>

	<packaging>jar</packaging> <!-- Update packaging to use as a dependency instead of a plugin -->
	<name>Script Security Plugin</name>
	<description>Allows Jenkins administrators to control what in-process scripts can be run by less-privileged
		users.
	</description>
	<url>https://github.com/jenkinsci/script-security-plugin</url>

	<properties>
		<java.level>21</java.level>
		<configuration-as-code.version>1.35</configuration-as-code.version>
		<maven.compiler.source>21</maven.compiler.source>
		<maven.compiler.target>21</maven.compiler.target>
	</properties>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>https://opensource.org/licenses/MIT</url>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
		<developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git
		</developerConnection>
		<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
		<tag>${scmTag}</tag>
	</scm>

	<parent>
		<groupId>org.craftercms</groupId>
		<artifactId>craftercms</artifactId>
		<version>4.2.1</version><!-- craftercms version flag -->
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<pluginRepositories>
		<pluginRepository>
			<id>repo.jenkins-ci.org</id>
			<url>https://repo.jenkins-ci.org/public/</url>
		</pluginRepository>
	</pluginRepositories>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<reuseForks>false</reuseForks>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-collections4</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava-collections</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.groovy</groupId>
			<artifactId>groovy-all</artifactId>
			<scope>provided</scope>
			<type>pom</type>
		</dependency>

		<dependency>
			<groupId>org.apache.groovy</groupId>
			<artifactId>groovy-sql</artifactId>
		</dependency>

		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>findbugs</artifactId>
			<exclusions>
				<exclusion>
					<groupId>dom4j</groupId>
					<artifactId>dom4j</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.google.code.findbugs</groupId>
					<artifactId>bcel-findbugs</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.apache.bcel</groupId>
			<artifactId>bcel</artifactId>
		</dependency>

		<dependency>
			<groupId>org.craftercms</groupId>
			<artifactId>groovy-sandbox</artifactId>
		</dependency>

		<dependency>
			<groupId>com.github.ben-manes.caffeine</groupId>
			<artifactId>caffeine</artifactId>
		</dependency>
	</dependencies>

	<!--	<dependencyManagement>-->
	<!--		<dependencies>-->
	<!--			<dependency>-->
	<!--				<groupId>org.craftercms</groupId>-->
	<!--				<artifactId>craftercms</artifactId>-->
	<!--				<type>pom</type>-->
	<!--				<scope>import</scope>-->
	<!--			</dependency>-->
	<!--		</dependencies>-->
	<!--	</dependencyManagement>-->

	<profiles>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<repositories>
		<repository>
			<id>sonatype-snapshots</id>
			<name>Sonatype Snapshot Repository</name>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>always</updatePolicy>
				<checksumPolicy>fail</checksumPolicy>
			</snapshots>
		</repository>
	</repositories>

	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-snapshots</id>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-staging</id>
			<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>
</project>
