<?xml version="1.0" encoding="UTF-8"?>

<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>com.a9ski</groupId>
    <artifactId>quick-start</artifactId>
    <version>1.0.0</version>
    <packaging>maven-archetype</packaging>

    <name>Archetype - quick-start</name>

    <description>Maven archetype for java CLI projects</description>

    <url>https://github.com/thexman/quick-start</url>
    <inceptionYear>2022</inceptionYear>
    <organization>
        <name>a9ski</name>
        <url>http://www.a9ski.com/</url>
    </organization>

    <developers>
        <developer>
            <id>thexman</id>
            <name>Kiril Arabadzhiyski</name>
            <email>thexman@dir.bg</email>
            <url>https://github.com/thexman</url>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/thexman/quick-start</url>
        <connection>scm:git:ssh://git@github.com/thexman/quick-start.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/thexman/quick-start.git</developerConnection>
        <tag>v1.0.0</tag>
    </scm>
    <licenses>
        <license>
            <name>apache_v2</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <name>Central Repository OSSRH Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <name>Central Repository OSSRH</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
    </properties>

    <build>
        <extensions>
            <extension>
                <groupId>org.apache.maven.archetype</groupId>
                <artifactId>archetype-packaging</artifactId>
                <version>3.2.1</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.0-M5</version>
                <configuration>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <arguments>-Prelease</arguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                    <licenseName>apache_v2</licenseName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.13</version>
                <!--extensions>true</extensions-->
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <!--stagingProfileId>xxx</stagingProfileId-->
                    <!--autoReleaseAfterClose>true</autoReleaseAfterClose-->
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <!-- Required so that .gitignore gets included in archetypes -->
                    <!-- See https://issues.apache.org/jira/browse/MRESOURCES-190 -->
                    <addDefaultExcludes>false</addDefaultExcludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>license-check</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>check-file-header</goal>
                                </goals>
                                <configuration>
                                    <failOnMissingHeader>true</failOnMissingHeader>
                                    <failOnNotUptodateHeader>true</failOnNotUptodateHeader>
                                    <excludes>
                                        <exclude>**/*.properties</exclude>
                                        <exclude>**/*.js</exclude>
                                        <exclude>**/*.css</exclude>
                                        <exclude>**/*.html</exclude>
                                        <exclude>**/*.xml</exclude>
                                        <exclude>**/archetype-resources/**</exclude>
                                    </excludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <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-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>net.ju-n.maven.plugins</groupId>
                        <artifactId>checksum-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>generate-checksum</id>
                                <goals>
                                    <goal>artifacts</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
