<?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>org.taxilang</groupId>
   <artifactId>parent</artifactId>
   <packaging>pom</packaging>
   <version>1.71.0</version>
   <parent>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-parent</artifactId>
      <version>3.3.5</version>
   </parent>

   <name>Taxi</name>
   <description>Taxi is a language for defining semantic API and data contracts, and describing how data relates between
      systems
   </description>
   <licenses>
      <license>
         <name>The Apache Software License, Version 2.0</name>
         <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      </license>
   </licenses>
   <url>https://taxilang.org</url>


   <scm>
      <url>https://github.com/taxilang/taxilang</url>
      <connection>scm:git:ssh://github.com/taxilang/taxilang.git</connection>
      <developerConnection>scm:git:ssh://git@github.com/taxilang/taxilang.git</developerConnection>
   </scm>


   <developers>
      <developer>
         <name>Marty Pitt</name>
         <email>marty.pitt@orbitalhq.com</email>
         <organization>Orbital</organization>
         <organizationUrl>https://orbitalhq.com</organizationUrl>
      </developer>
      <developer>
         <name>Serhat Tuncay</name>
         <email>serhat.tuncay@orbitalhq.com</email>
         <organization>Orbital</organization>
         <organizationUrl>https://orbitalhq.com</organizationUrl>
      </developer>
   </developers>

   <modules>
      <module>language-server</module>
      <module>compiler</module>
      <module>taxi-annotations</module>
      <module>java2taxi</module>
      <module>swagger2taxi</module>
      <module>taxi-stdlib-annotations</module>
      <module>taxi-generator-api</module>
      <module>taxi-jvm-common</module>
      <module>taxi-cli</module>
      <module>taxi-plugin-api</module>
      <module>plugins</module>
      <module>kotlin</module>
      <module>lang-to-taxi-api</module>
      <module>core-types</module>
      <module>package-repository-api</module>
      <module>sample-compiled-taxonomy</module>
      <module>xsd2taxi</module>
      <module>jsonSchema-to-taxi</module>
      <module>protobuf-to-taxi</module>
      <module>java-spring-taxi</module>
      <module>typescript</module>
      <module>taxi-to-openapi-plugin</module>
      <module>soap-to-taxi</module>
      <module>package-manager</module>
      <module>avro-to-taxi</module>
      <module>taxiql-codegen</module>
       <module>taxi2java</module>
      <module>taxiql-jvm</module>
   </modules>

   <properties>
      <java.version>21</java.version>
      <kotlin.compiler.jvmTarget>${java.version}</kotlin.compiler.jvmTarget>
      <kotlin.version>2.2.21</kotlin.version>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <arrow.version>1.1.5</arrow.version>
      <guava.version>33.0.0-jre</guava.version>
      <spek.version>2.0.19</spek.version>
      <kotest.version>5.9.1</kotest.version>
      <junit.jupiter.version>5.9.1</junit.jupiter.version>
      <junit.vintage.version>5.6.2</junit.vintage.version>
      <zip4j.version>2.11.5</zip4j.version>

      <taxi.version>${project.version}</taxi.version>
      <testcontainers.version>1.19.3</testcontainers.version>
      <reactor-bom.version>2023.0.0</reactor-bom.version>
      <commons-io.version>2.17.0</commons-io.version>
   </properties>

   <dependencies>
      <dependency>
         <groupId>org.jetbrains.kotlin</groupId>
         <artifactId>kotlin-stdlib-jdk8</artifactId>
         <version>${kotlin.version}</version>
      </dependency>
      <dependency>
         <groupId>org.jetbrains.kotlin</groupId>
         <artifactId>kotlin-test</artifactId>
         <version>${kotlin.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jetbrains.kotlin</groupId>
         <artifactId>kotlin-reflect</artifactId>
         <version>${kotlin.version}</version>
      </dependency>
      <dependency>
         <groupId>com.winterbe</groupId>
         <artifactId>expekt</artifactId>
         <version>0.5.0</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.junit.jupiter</groupId>
         <artifactId>junit-jupiter-api</artifactId>
         <version>${junit.jupiter.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.junit.jupiter</groupId>
         <artifactId>junit-jupiter-engine</artifactId>
         <version>${junit.jupiter.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.junit.platform</groupId>
         <artifactId>junit-platform-launcher</artifactId>
         <version>1.7.2</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
         <version>4.11.0</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.mockito.kotlin</groupId>
         <artifactId>mockito-kotlin</artifactId>
         <version>4.1.0</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <scope>test</scope>
      </dependency>
      <!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
      <dependency>
         <groupId>org.assertj</groupId>
         <artifactId>assertj-core</artifactId>
         <version>3.24.2</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>io.kotest</groupId>
         <artifactId>kotest-runner-junit5-jvm</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>io.kotest</groupId>
         <artifactId>kotest-assertions-core-jvm</artifactId>
         <scope>test</scope>
      </dependency>

   </dependencies>

   <dependencyManagement>
      <dependencies>
         <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io.version}</version>
         </dependency>

         <!-- ByteBuddy dependencies are transitive dependencies of Mocktio, and we seem to
         be picking up old versions, leading to "Mockito can only mock non-private & non-final classes." errors -->
         <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>1.14.0</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy-agent</artifactId>
            <version>1.14.0</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>4.11.0</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>org.mockito.kotlin</groupId>
            <artifactId>mockito-kotlin</artifactId>
            <version>4.1.0</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>org.spekframework.spek2</groupId>
            <artifactId>spek-dsl-jvm</artifactId>
            <version>${spek.version}</version>
            <scope>test</scope>
         </dependency>
         <!-- spek breaks whenever a new release of intelliJ is out, so lets migrate to kotest -->
         <dependency>
            <groupId>org.spekframework.spek2</groupId>
            <artifactId>spek-runner-junit5</artifactId>
            <version>${spek.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>io.kotest</groupId>
            <artifactId>kotest-runner-junit5-jvm</artifactId>
            <version>${kotest.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>io.kotest</groupId>
            <artifactId>kotest-assertions-core-jvm</artifactId>
            <version>${kotest.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>io.github.config4k</groupId>
            <artifactId>config4k</artifactId>
            <version>0.5.0</version>
         </dependency>
         <dependency>
            <groupId>com.typesafe</groupId>
            <artifactId>config</artifactId>
            <version>1.4.2</version>
         </dependency>
         <dependency>
            <groupId>io.arrow-kt</groupId>
            <artifactId>arrow-core</artifactId>
            <version>${arrow.version}</version>
         </dependency>
         <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
         </dependency>
         <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
            <version>${kotlin.version}</version>
         </dependency>
         <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk7</artifactId>
            <version>${kotlin.version}</version>
         </dependency>
         <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
            <version>${kotlin.version}</version>
         </dependency>
         <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
         </dependency>
         <dependency>
            <groupId>net.lingala.zip4j</groupId>
            <artifactId>zip4j</artifactId>
            <version>${zip4j.version}</version>
         </dependency>
         <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-bom</artifactId>
            <version>${reactor-bom.version}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
      </dependencies>
   </dependencyManagement>
   <build>
      <extensions>
         <extension>
            <groupId>io.github.michaelboyles</groupId>
            <artifactId>s3-maven-extension</artifactId>
            <version>0.6.0</version>
         </extension>
      </extensions>
      <plugins>
         <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.2.5</version>
            <configuration>
               <includes>
                  <include>Test*</include>
                  <include>*Tests</include>
                  <include>*Test</include>
                  <include>*Spec</include>
                  <include>*Spek</include>
               </includes>
            </configuration>
         </plugin>
         <plugin>
            <groupId>com.amashchenko.maven.plugin</groupId>
            <artifactId>gitflow-maven-plugin</artifactId>
            <version>1.19.0</version>
            <configuration>
               <!-- whether to push to the git remote. Very useful for testing locally -->
               <pushRemote>true</pushRemote>
               <!-- Set to true to immediately bump the development version when creating a release branch -->
               <commitDevelopmentVersionAtStart>false</commitDevelopmentVersionAtStart>
               <!-- Execute mvn compile before release -->
               <preReleaseGoals>compile</preReleaseGoals>
               <commitMessages>
                  <releaseStartMessage>Update versions for release @{version}</releaseStartMessage>
                  <releaseFinishMessage>[skip ci] Update for next development version @{version}</releaseFinishMessage>
                  <releaseVersionUpdateMessage>[skip ci] Update for next development version @{version}
                  </releaseVersionUpdateMessage>
               </commitMessages>
               <!-- Configure branches -->
               <gitFlowConfig>
                  <productionBranch>master</productionBranch>
                  <!-- default is develop, but we use development -->
                  <developmentBranch>develop</developmentBranch>
               </gitFlowConfig>
            </configuration>
         </plugin>
         <plugin>
            <artifactId>kotlin-maven-plugin</artifactId>
            <groupId>org.jetbrains.kotlin</groupId>
            <version>${kotlin.version}</version>
            <executions>
               <execution>
                  <id>kapt</id>
                  <goals>
                     <goal>kapt</goal>
                  </goals>
                  <configuration>
                     <sourceDirs>
                        <sourceDir>${project.basedir}/target/generated-sources/antlr4</sourceDir>
                        <sourceDir>src/main/java</sourceDir>
                     </sourceDirs>
                  </configuration>
               </execution>
               <execution>
                  <id>compile</id>
                  <goals>
                     <goal>compile</goal>
                  </goals>
                  <configuration>
                     <sourceDirs>
                        <sourceDir>${project.basedir}/target/generated-sources/antlr4</sourceDir>
                        <sourceDir>src/main/java</sourceDir>
                     </sourceDirs>
                  </configuration>
               </execution>

               <execution>
                  <id>test-compile</id>
                  <goals>
                     <goal>test-compile</goal>
                  </goals>
                  <configuration>
                     <sourceDirs>
                        <sourceDir>src/test/kotlin</sourceDir>
                        <sourceDir>src/test/java</sourceDir>
                        <sourceDir>target/generated-sources/kaptKotlin/test</sourceDir>
                     </sourceDirs>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.11.0</version>
            <configuration>
               <!--<proc>none</proc>-->
               <source>${java.version}</source>
               <target>${java.version}</target>
            </configuration>
            <executions>
               <!-- Replacing default-compile as it is treated specially by maven -->
               <execution>
                  <id>default-compile</id>
                  <phase>none</phase>
               </execution>
               <!-- Replacing default-testCompile as it is treated specially by maven -->
               <execution>
                  <id>default-testCompile</id>
                  <phase>none</phase>
               </execution>
               <execution>
                  <id>java-compile</id>
                  <phase>compile</phase>
                  <goals>
                     <goal>compile</goal>
                  </goals>
               </execution>
               <execution>
                  <id>java-test-compile</id>
                  <phase>test-compile</phase>
                  <goals>
                     <goal>testCompile</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.1</version>
            <executions>
               <execution>
                  <id>attach-sources</id>
                  <goals>
                     <goal>jar</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.jetbrains.dokka</groupId>
            <artifactId>dokka-maven-plugin</artifactId>
            <version>2.1.0</version>
            <executions>
               <execution>
                  <phase>prepare-package</phase>
                  <goals>
                     <goal>javadocJar</goal>
                  </goals>
               </execution>
            </executions>
            <configuration>
               <dokkaPlugins>
                  <plugin>
                     <groupId>org.jetbrains.dokka</groupId>
                     <artifactId>kotlin-as-java-plugin</artifactId>
                     <version>2.1.0</version>
                  </plugin>
               </dokkaPlugins>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.5.3</version>
            <configuration>
               <autoVersionSubmodules>true</autoVersionSubmodules>
               <useReleaseProfile>false</useReleaseProfile>
               <releaseProfiles>release</releaseProfiles>
               <goals>deploy</goals>
            </configuration>
         </plugin>

      </plugins>
   </build>

   <profiles>
      <!-- configures loopback (ie., not prompting) for the GPG passphrase. Use this in the ci server -->
      <profile>
         <id>loopback-gpg</id>
         <build>
            <pluginManagement>
               <plugins>
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-gpg-plugin</artifactId>
                     <configuration>
                        <gpgArguments>
                           <arg>--pinentry-mode</arg>
                           <arg>loopback</arg>
                        </gpgArguments>
                     </configuration>
                  </plugin>
               </plugins>
            </pluginManagement>
         </build>
      </profile>
      <profile>
         <id>maven-central</id>
         <activation>
            <activeByDefault>false</activeByDefault>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-gpg-plugin</artifactId>
                  <version>3.2.8</version>
                  <executions>
                     <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                           <goal>sign</goal>
                        </goals>
                        <configuration>
                           <gpgArguments>
                              <arg>--pinentry-mode</arg>
                              <arg>loopback</arg>
                           </gpgArguments>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>io.github.mavenplugins</groupId>
                  <artifactId>central-publishing-maven-plugin</artifactId>
                  <version>1.1.1</version>
                  <extensions>true</extensions>
                  <configuration>
                     <publishingServerId>central</publishingServerId>
                     <autoPublish>true</autoPublish>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
      <profile>
         <id>orbital-repo</id>
         <activation>
            <activeByDefault>false</activeByDefault>
         </activation>
         <distributionManagement>
            <repository>
               <id>repo.orbitalhq.com</id>
               <url>s3://repo.orbitalhq.com/release</url>
            </repository>
            <snapshotRepository>
               <id>repo.orbitalhq.com</id>
               <url>s3://repo.orbitalhq.com/snapshot</url>
            </snapshotRepository>
         </distributionManagement>
      </profile>
      <profile>
         <id>snapshot-release</id>
         <activation>
            <activeByDefault>false</activeByDefault>
         </activation>
      </profile>
      <profile>
         <id>release</id>
         <activation>
            <activeByDefault>false</activeByDefault>
         </activation>
      </profile>
   </profiles>
</project>
