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

  <parent>
    <groupId>org.camunda.spin</groupId>
    <artifactId>camunda-spin-root</artifactId>
    <version>7.23.0</version>
  </parent>

  <artifactId>camunda-spin-dataformat-xml-dom-jakarta</artifactId>
  <name>camunda Spin - DOM XML data format Jakarta</name>

  <properties>
    <jaxb-runtime.version>4.0.1</jaxb-runtime.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.camunda.spin</groupId>
      <artifactId>camunda-spin-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.camunda.commons</groupId>
      <artifactId>camunda-commons-logging</artifactId>
    </dependency>

    <dependency>
      <groupId>org.camunda.commons</groupId>
      <artifactId>camunda-commons-utils</artifactId>
    </dependency>

    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
      <version>${version.jakarta.xml.bind-api}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
      <version>${jaxb-runtime.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.groovy</groupId>
      <artifactId>groovy-jsr223</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.groovy</groupId>
      <artifactId>groovy-xml</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.python</groupId>
      <artifactId>jython</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-complete</artifactId>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.graalvm.js</groupId>
      <artifactId>js</artifactId>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.graalvm.js</groupId>
      <artifactId>js-scriptengine</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito2</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.camunda.spin</groupId>
      <artifactId>camunda-spin-core</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>jdk-15-and-onwards</id>
      <activation>
        <jdk>[15,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <excludes combine.children="append">
                <exclude>**/nashorn/**</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>jdk-16-and-onwards</id>
      <activation>
        <jdk>[16,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <argLine>
                -XX:MetaspaceSize=128m
              </argLine>
              <excludes combine.children="append">
                <exclude>**/nashorn/**</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/generated-sources/jakarta</outputDirectory>
               <resources>
                <resource>
                  <directory>${basedir}/../dataformat-xml-dom/src/main/java</directory>
                  <filtering>false</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>resources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/generated-resources/jakarta</outputDirectory>
              <resources>
                <resource>
                  <directory>${basedir}/../dataformat-xml-dom/src/main/resources</directory>
                  <filtering>false</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/generated-test-sources/jakarta</outputDirectory>
              <resources>
                <resource>
                  <directory>${basedir}/../dataformat-xml-dom/src/test/java</directory>
                  <filtering>false</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>test-resources</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/generated-test-resources/jakarta</outputDirectory>
              <resources>
                <resource>
                  <directory>${basedir}/../dataformat-xml-dom/src/test/resources</directory>
                  <filtering>false</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>initialize</phase>
            <goals>
              <goal>properties</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eclipse.transformer</groupId>
        <artifactId>transformer-maven-plugin</artifactId>
        <configuration>
          <rules combine.self="override">
            <jakartaDefaults>true</jakartaDefaults>
          </rules>
        </configuration>
        <executions>
          <execution>
            <id>transform-jakarta-sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>transform</goal>
            </goals>
            <configuration>
              <transformDirectory>${project.build.directory}/generated-sources/jakarta</transformDirectory>
            </configuration>
          </execution>
          <execution>
            <id>transform-jakarta-resources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>transform</goal>
            </goals>
            <configuration>
              <transformDirectory>${project.build.directory}/generated-resources/jakarta</transformDirectory>
            </configuration>
          </execution>
          <execution>
            <id>transform-jakarta-test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>transform</goal>
            </goals>
            <configuration>
              <transformDirectory>${project.build.directory}/generated-test-sources/jakarta</transformDirectory>
            </configuration>
          </execution>
          <execution>
            <id>transform-jakarta-test-resources</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>transform</goal>
            </goals>
            <configuration>
              <transformDirectory>${project.build.directory}/generated-test-resources/jakarta</transformDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>add-jakarta-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${basedir}/target/generated-sources/jakarta</source>
              </sources>
            </configuration>
          </execution>
          <execution>
            <id>add-jakarta-resource</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>add-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource><directory>${basedir}/target/generated-resources/jakarta</directory></resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>add-jakarta-test-source</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${basedir}/target/generated-test-sources/jakarta</source>
              </sources>
            </configuration>
          </execution>
          <execution>
            <id>add-jakarta-test-resource</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>add-test-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource><directory>${basedir}/target/generated-test-resources/jakarta</directory></resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
