<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ JBoss, Home of Professional Open Source
~ Copyright 2014 Red Hat Inc. and/or its affiliates and other contributors
~ as indicated by the @authors tag. All rights reserved.
~ See the copyright.txt in the distribution for a
~ full listing of individual contributors.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~ http://www.apache.org/licenses/LICENSE-2.0
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<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">

    <!-- Parent -->
    <!-- <parent> -->
    <!--     <groupId>org.jboss</groupId> -->
    <!--     <artifactId>jboss-parent</artifactId> -->
    <!--     <version>19</version> -->
    <!--     <relativePath /> -->
    <!-- </parent> -->
    <!---->
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.aesh</groupId>
    <artifactId>readline-all</artifactId>
    <packaging>pom</packaging>
    <version>3.2</version>
    <name>Æsh Readline and terminal</name>
    <description>Æsh (Another Extendable SHell) Readline and Terminal API</description>
    <url>https://aeshell.github.io</url>
    <scm>
        <connection>scm:git:git://github.com/aeshell/aesh-readline.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/aeshell/aesh-readline.git</developerConnection>
        <url>https://github.com/aeshell/aesh-readline/tree/master</url>
    </scm>

    <modules>
        <module>terminal-api</module>
        <module>terminal-tty</module>
        <module>readline</module>
        <module>terminal-ssh</module>
        <module>terminal-telnet</module>
        <module>terminal-http</module>
    </modules>
    
    <!-- Licenses -->
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
  
    <properties>
      <version.org.slf4j>1.7.12</version.org.slf4j>
      <netty.version>4.1.81.Final</netty.version>
      <jackson.version>2.7.4</jackson.version>
      <jansi.version>3.30.6</jansi.version>
      <junit.version>4.12</junit.version>

      <!-- maven-compiler-plugin -->
      <maven.compiler.target>1.8</maven.compiler.target>
      <maven.compiler.source>1.8</maven.compiler.source>

      <!-- Code formatting -->
      <version.formatter.plugin>2.27.0</version.formatter.plugin>
      <version.impsort.plugin>1.13.0</version.impsort.plugin>
      <format.skip>false</format.skip>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

      <!-- Maven plugin versions -->
      <version.compiler.plugin>3.14.0</version.compiler.plugin>
      <version.surefire.plugin>3.5.3</version.surefire.plugin>
      <version.jar.plugin>3.4.2</version.jar.plugin>
      <version.source.plugin>3.3.1</version.source.plugin>
      <version.javadoc.plugin>3.11.2</version.javadoc.plugin>
      <version.shade.plugin>3.6.0</version.shade.plugin>
      <version.enforcer.plugin>3.5.0</version.enforcer.plugin>
      <version.gpg.plugin>3.2.7</version.gpg.plugin>
      <version.nexus-staging.plugin>1.7.0</version.nexus-staging.plugin>
      <version.clean.plugin>3.4.0</version.clean.plugin>
      <version.resources.plugin>3.3.1</version.resources.plugin>
      <version.install.plugin>3.1.3</version.install.plugin>
      <version.deploy.plugin>3.1.3</version.deploy.plugin>
      <version.site.plugin>3.21.0</version.site.plugin>
    </properties>
 
    <developers>
        <developer>
            <name>Jean-Francois Denise</name>
            <email>jdenise@redhat.com</email>
            <organization>Red Hat</organization>
            <organizationUrl>http://www.redhat.com</organizationUrl>
        </developer>
        <developer>
            <name>Ståle Pedersen</name>
            <email>spederse@redhat.com</email>
            <organization>Red Hat</organization>
            <organizationUrl>http://www.redhat.com</organizationUrl>
        </developer>
    </developers>

    <distributionManagement>
        <repository>
            <id>jboss-testing-repository</id>
            <name>JBoss Testing Repository</name>
            <url>https://repository.jboss.org/nexus/repository/testing/</url>
        </repository>
        <snapshotRepository>
            <id>jboss-snapshots-repository</id>
            <name>JBoss Snapshots Repository</name>
            <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
      <pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${version.javadoc.plugin}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>${version.enforcer.plugin}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>${version.jar.plugin}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${version.source.plugin}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-gpg-plugin</artifactId>
              <version>${version.gpg.plugin}</version>
              <executions>
                <execution>
                  <id>sign-artifacts</id>
                  <phase>verify</phase>
                  <goals>
                    <goal>sign</goal>
                  </goals>
                  <configuration>
                    <useAgent>true</useAgent>
                    <keyname>${gpg.keyname}</keyname>
                    <passphraseServerId>${gpg.keyname}</passphraseServerId> 
                    <gpgArguments>
                      <arg>--pinentry-mode</arg>
                      <arg>loopback</arg>
                    </gpgArguments>
                  </configuration>
                </execution>
              </executions>
            </plugin>
            <plugin>
              <groupId>org.sonatype.plugins</groupId>
              <artifactId>nexus-staging-maven-plugin</artifactId>
              <version>${version.nexus-staging.plugin}</version>
              <extensions>true</extensions>
              <configuration>
                <serverId>jboss-testing-repository</serverId>
                <nexusUrl>https://repository.jboss.org/nexus/</nexusUrl>
                <autoReleaseAfterClose>false</autoReleaseAfterClose>
              </configuration>
            </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>${version.shade.plugin}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${version.compiler.plugin}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${version.surefire.plugin}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-clean-plugin</artifactId>
            <version>${version.clean.plugin}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>${version.resources.plugin}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-install-plugin</artifactId>
            <version>${version.install.plugin}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>${version.deploy.plugin}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>${version.site.plugin}</version>
          </plugin>
          <plugin>
            <groupId>net.revelc.code.formatter</groupId>
            <artifactId>formatter-maven-plugin</artifactId>
            <version>${version.formatter.plugin}</version>
            <configuration>
              <cachedir>.cache/formatter-maven-plugin-${version.formatter.plugin}</cachedir>
              <configFile>${maven.multiModuleProjectDirectory}/config/eclipse-format.xml</configFile>
              <lineEnding>LF</lineEnding>
              <skip>${format.skip}</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>net.revelc.code</groupId>
            <artifactId>impsort-maven-plugin</artifactId>
            <version>${version.impsort.plugin}</version>
            <configuration>
              <cachedir>.cache/impsort-maven-plugin-${version.impsort.plugin}</cachedir>
              <groups>java.,javax.,jakarta.,org.,com.</groups>
              <staticGroups>*</staticGroups>
              <skip>${format.skip}</skip>
              <removeUnused>true</removeUnused>
            </configuration>
          </plugin>
        </plugins>
     </pluginManagement>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-source-plugin</artifactId>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
       </plugin>
     </plugins>
   </build>

   <profiles>
     <profile>
       <id>release</id>
       <build>
         <plugins>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-gpg-plugin</artifactId>
           </plugin>
         </plugins>
       </build>
     </profile>
     <profile>
       <id>benchmark</id>
       <modules>
         <module>benchmark</module>
       </modules>
     </profile>
     <profile>
       <id>format</id>
       <activation>
         <activeByDefault>true</activeByDefault>
         <property>
           <name>!no-format</name>
         </property>
       </activation>
       <build>
         <plugins>
           <plugin>
             <groupId>net.revelc.code.formatter</groupId>
             <artifactId>formatter-maven-plugin</artifactId>
             <executions>
               <execution>
                 <phase>process-sources</phase>
                 <goals>
                   <goal>format</goal>
                 </goals>
               </execution>
             </executions>
           </plugin>
           <plugin>
             <groupId>net.revelc.code</groupId>
             <artifactId>impsort-maven-plugin</artifactId>
             <executions>
               <execution>
                 <id>sort-imports</id>
                 <goals>
                   <goal>sort</goal>
                 </goals>
               </execution>
             </executions>
           </plugin>
         </plugins>
       </build>
     </profile>
     <profile>
       <id>validate</id>
       <activation>
         <property>
           <name>no-format</name>
         </property>
       </activation>
       <build>
         <plugins>
           <plugin>
             <groupId>net.revelc.code.formatter</groupId>
             <artifactId>formatter-maven-plugin</artifactId>
             <executions>
               <execution>
                 <phase>process-sources</phase>
                 <goals>
                   <goal>validate</goal>
                 </goals>
               </execution>
             </executions>
           </plugin>
           <plugin>
             <groupId>net.revelc.code</groupId>
             <artifactId>impsort-maven-plugin</artifactId>
             <executions>
               <execution>
                 <id>check-imports</id>
                 <goals>
                   <goal>check</goal>
                 </goals>
               </execution>
             </executions>
           </plugin>
         </plugins>
       </build>
     </profile>
   </profiles>

</project>
