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

	This file is part of the Meeds project (https://meeds.io/).
	Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io
	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public
	License as published by the Free Software Foundation; either
	version 3 of the License, or (at your option) any later version.
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
	Lesser General Public License for more details.
	You should have received a copy of the GNU Lesser General Public License
	along with this program; if not, write to the Free Software Foundation,
	Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

-->
<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>io.meeds.deeds-dapp</groupId>
    <artifactId>deeds-dapp-parent</artifactId>
    <version>7.2.0-meed-20251211</version>
  </parent>
  <artifactId>deeds-dapp-contract</artifactId>
  <name>Meeds:: Deeds Dapp - Solidity Contracts</name>
  <properties>
    <exo.test.coverage.ratio>0</exo.test.coverage.ratio>
  </properties>
  <dependencies>
    <dependency>
      <groupId>io.meeds.portal</groupId>
      <artifactId>portal.component.api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.web3j</groupId>
      <artifactId>core</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.web3j</groupId>
      <artifactId>web3j-unit</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>tech.pegasys.discovery</groupId>
          <artifactId>discovery</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.beust</groupId>
          <artifactId>klaxon</artifactId>
        </exclusion>
        <exclusion>
          <groupId>net.consensys.services</groupId>
          <artifactId>quorum-mainnet-launcher</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.splunk.logging</groupId>
          <artifactId>splunk-library-javalogging</artifactId>
        </exclusion>
        <exclusion>
          <groupId>net.consensys.services</groupId>
          <artifactId>quorum-mainnet-launcher</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <build>
    <finalName>${project.artifactId}</finalName>
    <sourceDirectory>target/generated-sources</sourceDirectory>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>**/*</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>src/test/resources</directory>
        <excludes>
          <exclude>**/*</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.web3j</groupId>
        <artifactId>web3j-maven-plugin</artifactId>
        <version>4.10.3</version>
        <executions>
          <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>generate-sources</goal>
            </goals>
            <configuration>
              <packageName>io.meeds.deeds.contract</packageName>
              <sourceDestination>${project.basedir}/target/generated-sources</sourceDestination>
              <nativeJavaType>true</nativeJavaType>
              <outputFormat>java,abi</outputFormat>
              <soliditySourceFiles>
                <directory>${project.basedir}/src/main/resources</directory>
                <includes>
                  <include>**/*.sol</include>
                </includes>
              </soliditySourceFiles>
              <outputDirectory>
                <java>${project.basedir}/target/generated-sources</java>
              </outputDirectory>
            </configuration>
          </execution>
          <execution>
            <id>generate-test-sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>generate-sources</goal>
            </goals>
            <configuration>
              <packageName>io.meeds.deeds.contract</packageName>
              <sourceDestination>${project.basedir}/target/generated-sources</sourceDestination>
              <nativeJavaType>true</nativeJavaType>
              <outputFormat>java</outputFormat>
              <soliditySourceFiles>
                <directory>${project.basedir}/src/test/resources</directory>
                <includes>
                  <include>**/*.sol</include>
                </includes>
              </soliditySourceFiles>
              <outputDirectory>
                <java>${project.basedir}/target/generated-sources</java>
              </outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>target/generated-sources</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
