<?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.partisiablockchain.language</groupId>
  <artifactId>example-contracts-java-test</artifactId>
  <version>4.18.0</version>

  <licenses>
    <license>
      <name>AGPL-3.0-or-later</name>
      <url>https://www.gnu.org/licenses/agpl.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <repositories>
    <repository>
      <id>gitlab-partisiablockchain</id>
      <url>https://gitlab.com/api/v4/groups/12499775/-/packages/maven/</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>gitlab-partisiablockchain</id>
      <url>https://gitlab.com/api/v4/groups/12499775/-/packages/maven/</url>
    </pluginRepository>
  </pluginRepositories>

  <parent>
    <groupId>com.partisiablockchain</groupId>
    <artifactId>pom</artifactId>
    <version>4.116.0</version>
  </parent>

  <properties>
    <governance.SYS_BINDER>com.partisiablockchain.governance:sys-binder</governance.SYS_BINDER>
    <governance.REAL_BINDER>com.partisiablockchain.language:real-wasm-binder</governance.REAL_BINDER>
    <governance.REAL_DEPLOY>com.partisiablockchain.real:deploy</governance.REAL_DEPLOY>
    <governance.PUB_BINDER>com.partisiablockchain.language:pub-wasm-binder</governance.PUB_BINDER>
    <governance.PUB_DEPLOY>com.partisiablockchain.governance:pubdeploy</governance.PUB_DEPLOY>
    <governance.ROUTING>com.partisiablockchain.governance:routing</governance.ROUTING>
    <governance.CONSENSUS>com.partisiablockchain.consensus.fasttrack:plugin</governance.CONSENSUS>
    <governance.ACCOUNT_PLUGIN>com.partisiablockchain.governance:fee</governance.ACCOUNT_PLUGIN>
    <governance.SHARED_OBJECT_STORE>com.partisiablockchain.governance:shared-object-store</governance.SHARED_OBJECT_STORE>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.partisiablockchain.language</groupId>
      <artifactId>codegen-lib</artifactId>
      <version>5.147.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.partisiablockchain.governance</groupId>
      <artifactId>sys-binder</artifactId>
      <version>5.44.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.partisiablockchain.governance</groupId>
      <artifactId>fee</artifactId>
      <version>5.64.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.partisiablockchain.governance</groupId>
      <artifactId>pubdeploy</artifactId>
      <version>5.183.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.partisiablockchain.governance</groupId>
      <artifactId>routing</artifactId>
      <version>5.52.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.partisiablockchain.language</groupId>
      <artifactId>pub-wasm-binder</artifactId>
      <version>5.55.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.partisiablockchain.language</groupId>
      <artifactId>real-wasm-binder</artifactId>
      <version>5.64.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.partisiablockchain.real</groupId>
      <artifactId>deploy</artifactId>
      <version>5.189.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.partisiablockchain.language</groupId>
      <artifactId>junit-contract-test</artifactId>
      <version>5.264.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.partisiablockchain.consensus.fasttrack</groupId>
      <artifactId>plugin</artifactId>
      <version>5.53.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.partisiablockchain.governance</groupId>
      <artifactId>shared-object-store</artifactId>
      <version>5.55.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
         <execution>
          <phase>generate-test-sources</phase>
          <goals>
           <goal>add-test-source</goal>
          </goals>
          <configuration>
            <sources>
              <source>${project.basedir}/target/generated-test-sources/generated-abi</source>
            </sources>
          </configuration>
         </execution>
        </executions>
        </plugin>
      <plugin>
        <groupId>com.partisiablockchain.language</groupId>
        <artifactId>abi-generation-maven-plugin</artifactId>
        <version>5.147.0</version>
        <executions>
          <execution>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>abi-code-gen</goal>
            </goals>
            <configuration>
              <generateTestSources>true</generateTestSources>
              <pbcPath>${project.basedir}/../rust/target/wasm32-unknown-unknown/release/</pbcPath>
              <deserializeRpc>true</deserializeRpc>
              <namedTypes>
                <namedType>Model</namedType>
                <namedType>InternalVertex</namedType>
                <namedType>LeafVertex</namedType>
                <namedType>Sample</namedType>
              </namedTypes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>properties-maven-plugin</artifactId>
        <version>1.0.0</version>
        <executions>
          <execution>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>write-project-properties</goal>
            </goals>
            <configuration>
              <outputFile>${project.build.testOutputDirectory}/maven.properties</outputFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <id>copy</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>list</goal>
            </goals>
            <configuration>
              <outputFile>${project.build.testOutputDirectory}/maven.dependencies</outputFile>
              <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
              <excludeTransitive>true</excludeTransitive>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>