<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.github.martinpaljak</groupId>
    <version>26.04.20</version>
    <packaging>pom</packaging>
    <url>https://github.com/martinpaljak/JCardEngine</url>
    <artifactId>jcardengine-package</artifactId>
    <name>Java Card Runtime Simulator</name>
    <description>JCardEngine - JavaCard engine for Java</description>

    <developers>
        <developer>
            <email>martin@martinpaljak.net</email>
            <name>Martin Paljak</name>
            <roles>
                <role>maintainer</role>
                <role>developer</role>
            </roles>
        </developer>
        <developer>
            <email>jcarsim@licelus.com</email>
            <name>jCardSim Team</name>
            <organization>Licel Corporation</organization>
            <roles>
                <role>historical</role>
            </roles>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <project.build.outputTimestamp>2026-04-20T08:58:49Z</project.build.outputTimestamp>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <apdu4j.version>26.04.20.1</apdu4j.version>
        <javacard.version>3.0.5</javacard.version>
    </properties>

    <repositories>
        <repository>
            <id>javacard-pro</id>
            <url>https://mvn.javacard.pro/maven/</url>
        </repository>
        <repository>
            <id>javacard-pro-snapshots</id>
            <url>https://mvn.javacard.pro/maven/SNAPSHOTS/</url>
        </repository>
    </repositories>

    <scm>
        <connection>scm:git:git@github.com:martinpaljak/jcardengine.git</connection>
        <developerConnection>scm:git:git@github.com:martinpaljak/jcardengine.git</developerConnection>
        <url>git@github.com:martinpaljak/jcardengine.git</url>
    </scm>

    <modules>
        <module>simulator</module>
        <module>tool</module>
    </modules>

    <build>
        <plugins>
            <!-- Minimum Maven version. Not really relevant with wrapper -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.6.2</version>
                <executions>
                    <execution>
                        <id>enforce-maven-version</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>[17,)</version>
                                    <message>Project requires a LTS JDK from v17+</message>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>[3.9.14,)</version>
                                </requireMavenVersion>
                                <requirePluginVersions/>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!-- Target JDK 17 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.15.0</version>
                    <configuration>
                        <release>17</release>
                        <compilerArgs>
                            <arg>-Werror</arg>
                            <arg>-Xlint:deprecation</arg>
                            <arg>-Xlint:unchecked</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
                <!-- Version fixes -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.1.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.21.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.12.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.5</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.10.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>3.6.3</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.14</version>
                </plugin>
                <plugin>
                    <groupId>org.openrewrite.maven</groupId>
                    <artifactId>rewrite-maven-plugin</artifactId>
                    <version>6.36.0</version>
                    <configuration>
                        <activeRecipes>
                            <!-- Braces / style -->
                            <recipe>org.openrewrite.staticanalysis.NeedBraces</recipe>
                            <recipe>org.openrewrite.staticanalysis.EmptyBlock</recipe>
                            <recipe>org.openrewrite.staticanalysis.ModifierOrder</recipe>
                            <!-- Dead code / redundancy -->
                            <recipe>org.openrewrite.staticanalysis.RemoveExtraSemicolons</recipe>
                            <recipe>org.openrewrite.staticanalysis.UnnecessaryParentheses</recipe>
                        </activeRecipes>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.openrewrite.recipe</groupId>
                            <artifactId>rewrite-static-analysis</artifactId>
                            <version>2.32.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>check</id>
            <activation>
                <property>
                    <name>env.CI</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <slow.tests>true</slow.tests>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.openrewrite.maven</groupId>
                        <artifactId>rewrite-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>dryRun</goal>
                                </goals>
                                <phase>process-test-classes</phase>
                                <configuration>
                                    <failOnDryRunResults>true</failOnDryRunResults>
                                    <runPerSubmodule>true</runPerSubmodule>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs-maven-plugin</artifactId>
                        <version>4.9.8.3</version>
                        <executions>
                            <execution>
                                <id>parent-spotbugs</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <excludeFilterFile>spotbugs.xml</excludeFilterFile>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ci</id>
            <activation>
                <property>
                    <name>env.CI</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <slow.tests>true</slow.tests>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- OpenRewrite: apply fixes (bound to process-sources) -->
        <profile>
            <id>fixup</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.openrewrite.maven</groupId>
                        <artifactId>rewrite-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <phase>process-test-classes</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>gppro</id>
            <activation>
                <file>
                    <exists>${basedir}/GlobalPlatformPro/pom.xml</exists>
                </file>
            </activation>
            <modules>
                <module>GlobalPlatformPro</module>
            </modules>
        </profile>
    </profiles>
</project>

