<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>hu.blackbelt.eclipse</groupId>
  <artifactId>judo-misc-p2</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>
  <name>Judo Misc P2 site</name>
  <description>Judo Misc P2 Repository</description>
  <url>http://github.com/${project-repositoryId}</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>robson</id>
      <name>Róbert Csákány</name>
      <email>robert.csakany@blackbelt.hu</email>
      <url>https://github.com/robertcsakany</url>
      <organization>BlackBelt Technology</organization>
      <organizationUrl>http://www.blackbelt.hu</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git@github.com:${project-repositoryId}.git</connection>
    <developerConnection>scm:git:ssh://${git.username}@github.com:${project-repositoryId}.git</developerConnection>
    <url>http://github.com/${project-repositoryId}</url>
  </scm>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/${project-repositoryId}/issues</url>
  </issueManagement>
  <properties>
    <project-shortname>judo-misc-p2</project-shortname>
    <project-repositoryId>BlackBeltTechnology/judo-misc-p2</project-repositoryId>
    <revision>1.0.0</revision>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>org.reficio</groupId>
        <artifactId>p2-maven-plugin</artifactId>
        <version>2.0.0</version>
        <executions>
          <execution>
            <id>pack-repository</id>
            <phase>package</phase>
            <goals>
              <goal>site</goal>
            </goals>
            <configuration>
              <categoryFileURL>${basedir}/category.xml</categoryFileURL>
              <featureDefinitions>
                <feature>
                  <id>apache.commons.text.feature</id>
                  <version>${project.version}</version>
                  <label>Apache Commons Text feature</label>
                  <providerName>${project.groupId}</providerName>
                  <description>${project.description}</description>
                  <copyright>BlackBelt Technology</copyright>
                  <license>Eclipse Public License - v 2.0 (https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt)</license>
                  <generateSourceFeature>true</generateSourceFeature>
                  <artifacts>
                    <artifact>
                      <id>org.apache.commons:commons-text:1.9</id>
                      <transitive>true</transitive>
                      <source>true</source>
                    </artifact>
                  </artifacts>
                </feature>
              </featureDefinitions>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.4.2</version>
        <executions>
          <execution>
            <id>compress</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <descriptors>
            <descriptor>src/assembly/assembly.xml</descriptor>
          </descriptors>
          <tarLongFileMode>posix</tarLongFileMode>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>1.3.0</version>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>sign-artifacts</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.simplify4u.plugins</groupId>
            <artifactId>sign-maven-plugin</artifactId>
            <version>1.0.1</version>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release-dummy</id>
      <distributionManagement>
        <repository>
          <id>dummy-distribution</id>
          <url>file:///tmp/${project.groupId}-${project.artifactId}-${project.version}/maven-release/</url>
        </repository>
        <snapshotRepository>
          <id>dummy-distribution</id>
          <url>file:///tmp/${project.groupId}-${project.artifactId}-${project.version}/maven-snapshot/</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
    <profile>
      <id>release-judong</id>
      <distributionManagement>
        <repository>
          <id>judong-nexus-distribution</id>
          <url>https://nexus.judo.technology/repository/maven-judong-snapshots/</url>
        </repository>
        <snapshotRepository>
          <id>judong-nexus-distribution</id>
          <url>https://nexus.judo.technology/repository/maven-judong-snapshots/</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
    <profile>
      <id>release-central</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
              <stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
    <profile>
      <id>release-p2-judong</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>wagon-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>upload-repository</id>
                <phase>deploy</phase>
                <goals>
                  <goal>upload</goal>
                </goals>
                <configuration>
                  <serverId>judong-nexus-distribution</serverId>
                  <fromDir>${basedir}/target/repository</fromDir>
                  <includes>*/**</includes>
                  <url>dav:https://nexus.judo.technology/repository/p2-judong/</url>
                  <toDir>${project-shortname}/${project.version}</toDir>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>generate-github-asciidoc-diagrams</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <version>${asciidoctor.maven.plugin.version}</version>
            <executions>
              <execution>
                <id>generate-html-doc</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>process-asciidoc</goal>
                </goals>
                <configuration>
                  <backend>html5</backend>
                  <attributes>
                    <imagesdir>./images</imagesdir>
                    <toc>left</toc>
                    <icons>font</icons>
                    <sectanchors>true</sectanchors>
                    <idprefix />
                    <idseparator>-</idseparator>
                  </attributes>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.jruby</groupId>
                <artifactId>jruby-complete</artifactId>
                <version>${jruby.version}</version>
              </dependency>
              <dependency>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctorj</artifactId>
                <version>${asciidoctorj.version}</version>
              </dependency>
              <dependency>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctorj-diagram</artifactId>
                <version>${asciidoctorj.diagram.version}</version>
              </dependency>
              <dependency>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctorj-diagram-plantuml</artifactId>
                <version>1.2022.5</version>
              </dependency>
              <dependency>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctorj-diagram-ditaamini</artifactId>
                <version>1.0.3</version>
              </dependency>
            </dependencies>
            <configuration>
              <sourceDirectory>./.github</sourceDirectory>
              <requires>
                <require>asciidoctor-diagram</require>
              </requires>
              <attributes></attributes>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>3.3.0</version>
            <executions>
              <execution>
                <id>copy-generated-gitflow-diagrams</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${basedir}/.github</outputDirectory>
                  <resources>
                    <resource>
                      <directory>${basedir}/target/generated-docs/images/</directory>
                      <includes>
                        <include>*.png</include>
                      </includes>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <properties>
        <asciidoctor.maven.plugin.version>2.2.2</asciidoctor.maven.plugin.version>
        <asciidoctorj.version>2.5.6</asciidoctorj.version>
        <asciidoctorj.diagram.version>2.2.3</asciidoctorj.diagram.version>
        <jruby.version>9.3.4.0</jruby.version>
      </properties>
    </profile>
    <profile>
      <id>update-source-code-license</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>2.0.0</version>
            <executions>
              <execution>
                <id>first</id>
                <phase>process-sources</phase>
                <goals>
                  <goal>update-file-header</goal>
                </goals>
                <configuration>
                  <licenseName>apache_v2</licenseName>
                  <roots>
                    <root>src/main/java</root>
                    <root>src/test</root>
                  </roots>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <verbose>true</verbose>
              <addSvnKeyWords>false</addSvnKeyWords>
              <organizationName>BlackBelt Technology</organizationName>
              <inceptionYear>2018</inceptionYear>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
