<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>
    <parent>
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>plugin</artifactId>
        <version>4.31</version>
    </parent>

    <groupId>com.github.nfalco79</groupId>
    <artifactId>k8s-provisioning</artifactId>
    <version>1.0.1</version>
    <packaging>hpi</packaging>
    <name>Kubernates dynamic persistent volume provisioning Plugin</name>
    <description>This plugin allow agent provisioning in kubernates with persistent volume claim binded to job lifecycle.</description>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

	<developers>
		<developer>
			<id>nfalco79</id>
			<name>Nikolas Falco</name>
		</developer>
	</developers>
	<issueManagement>
		<system>github</system>
		<url>https://github.com/nfalco79/k8s-provisioning-plugin/issues</url>
	</issueManagement>

	<scm>
		<url>https://github.com/nfalco79/k8s-provisioning-plugin</url>
		<connection>scm:git:git@github.com:nfalco79/k8s-provisioning-plugin.git</connection>
		<developerConnection>scm:git:git@github.com:nfalco79/k8s-provisioning-plugin.git</developerConnection>
		<tag>k8s-provisioning-1.0.1</tag>
	</scm>

    <properties>
        <java.level>8</java.level>
        <jenkins.version>2.303.3</jenkins.version>
        <releaseProfiles>release</releaseProfiles>

        <sonar.organization>nfalco79</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    </properties>

    <repositories>
        <repository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </pluginRepository>
    </pluginRepositories>
    <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>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.jenkins.tools.bom</groupId>
                <artifactId>bom-2.303.x</artifactId>
                <version>1117.v62a_f6a_01de98</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>branch-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.csanchez.jenkins.plugins</groupId>
            <artifactId>kubernetes</artifactId>
            <version>1.31.3</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.22.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.0.0-M5</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>enable-jacoco</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.eluder.coveralls</groupId>
                            <artifactId>coveralls-maven-plugin</artifactId>
                            <version>4.3.0</version>
                            <configuration>
                                <repoToken>${env.COVERALLS_REPO_TOKEN}</repoToken>
                            </configuration>
                            <dependencies>
                                <!-- required on JDK 11 -->
                                <dependency>
                                    <groupId>com.sun.xml.bind</groupId>
                                    <artifactId>jaxb-impl</artifactId>
                                    <version>2.3.5</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.8.7</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <excludes>
                                <exclude>**/*Constants.class</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- used for local maven release build -->
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>  
</project>