<?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>one.edee.oss</groupId>
    <artifactId>proxycian</artifactId>
    <packaging>pom</packaging>
    <version>1.3.7</version>
    <name>JavAssist proxying - aggregation project</name>
    <url>https://github.com/FgForrest/Proxycian/</url>
    <description>
        Small Java library for generating dynamic proxies on top of [ByteBuddy](https://github.com/raphw/byte-buddy)
        or [Javassist](https://github.com/jboss-javassist/javassist). You can generate data transfer objects, rich
        traits or even whole implicit DAO implementations dynamically at runtime easily. This library solves the complex
        stuff, so you can focus on application logic. Serializability, cloning are already solved by us. We also aim for
        transparent and easily debuggable proxies, because as we know proxies is usually part of "magic" for the team.
        Hence, the name of this library - Proxycian as a magician for the proxies ;)
    </description>

    <modules>
        <module>proxycian_core</module>
        <module>proxycian_bytebuddy</module>
        <module>proxycian_javassist</module>
        <module>proxycian_tests</module>
    </modules>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://github.com/FgForrest/PMPTT/blob/master/LICENSE.md</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>JNO</id>
            <email>novotny@fg.cz</email>
            <name>Jan Novotný</name>
            <url>https://blog.novoj.net</url>
            <organization>FG Forrest, a.s.</organization>
            <organizationUrl>https://www.fg.cz</organizationUrl>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/
            </url>
        </repository>
    </distributionManagement>

    <scm>
        <connection>scm:git:ssh://git@github.com:FgForrest/Proxycian</connection>
        <developerConnection>scm:git:ssh://git@github.com:FgForrest/Proxycian</developerConnection>
        <url>https://edee.dev/</url>
        <tag>proxycian-1.3.7</tag>
    </scm>

    <organization>
        <name>FG Forrest, a.s.</name>
        <url>https://www.fg.cz</url>
    </organization>

    <properties>
        <!-- The oldest Java version supported by this tool. -->
        <!-- Will control compilation of the main code and the unit tests. -->
        <base.java.version>1.8</base.java.version>
        <version>8</version>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <junit-platform.version>5.9.1</junit-platform.version>

        <maven.compiler.version>3.10.1</maven.compiler.version>
        <maven.toolchains.version>3.0.0</maven.toolchains.version>

        <argLine />
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-toolchains-plugin</artifactId>
                <version>${maven.toolchains.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>3.0.2</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.24</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.12.0</version>
        </dependency>

        <!-- test libraries -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit-platform.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit-platform.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>jarjar-maven-plugin</artifactId>
                    <version>1.9</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-toolchains-plugin</artifactId>
                <version>${maven.toolchains.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>toolchain</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <toolchains>
                        <jdk>
                            <version>${version}</version>
                            <vendor>oracle</vendor>
                        </jdk>
                    </toolchains>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${base.java.version}</source>
                    <target>${base.java.version}</target>
                </configuration>
                <executions>
                    <!-- for Java 8 -->
                    <execution>
                        <id>java8</id>
                        <phase />
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <jdkToolchain>
                                <version>1.8</version>
                            </jdkToolchain>
                        </configuration>
                    </execution>
                    <!-- for Java 11 -->
                    <execution>
                        <id>java11</id>
                        <phase />
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <release>11</release>
                            <jdkToolchain>
                                <version>11</version>
                            </jdkToolchain>
                            <compileSourceRoots>
                                <compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>
                            </compileSourceRoots>
                            <multiReleaseOutput>true</multiReleaseOutput>
                        </configuration>
                    </execution>
                    <execution>
                        <id>java17</id>
                        <phase />
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <release>17</release>
                            <jdkToolchain>
                                <version>17</version>
                            </jdkToolchain>
                            <compileSourceRoots>
                                <compileSourceRoot>${project.basedir}/src/main/java17</compileSourceRoot>
                            </compileSourceRoots>
                            <multiReleaseOutput>true</multiReleaseOutput>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <doclint>none</doclint>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.9.5</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.13</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration> <!-- add this to disable checking -->
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- GPG Signature on release -->
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>java8</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>java8</id>
                                <phase>compile</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                          <version>3.0.0-M7</version>
                        <configuration>
                            <jdkToolchain>
                                <version>8</version>
                            </jdkToolchain>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>java11</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>java11</id>
                                <phase>compile</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>3.0.0-M6</version>
                        <configuration>
                            <argLine>
                                @{argLine}
                                --add-opens java.base/java.lang.invoke=ALL-UNNAMED
                            </argLine>
                            <jdkToolchain>
                                <version>11</version>
                            </jdkToolchain>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>java17</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>java17</id>
                                <phase>compile</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>3.0.0-M6</version>
                        <configuration>
                            <argLine>
                                @{argLine}
                                --add-opens java.base/java.lang.invoke=ALL-UNNAMED
                            </argLine>
                            <jdkToolchain>
                                <version>17</version>
                            </jdkToolchain>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>multi-jar</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- enable java8 - java11 - java17 compilations -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.10.1</version>
                        <executions>
                            <execution>
                                <id>java8</id>
                                <phase>compile</phase>
                            </execution>
                            <execution>
                                <id>java11</id>
                                <phase>compile</phase>
                            </execution>
                            <execution>
                                <id>java17</id>
                                <phase>compile</phase>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>3.0.0-M6</version>
                        <configuration>
                            <argLine>
                                @{argLine}
                                --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED
                            </argLine>
                            <jdkToolchain>
                                <version>17</version>
                            </jdkToolchain>
                        </configuration>
                    </plugin>

                    <!-- add the multi-release:true manifest entry -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>3.2.0</version>
                        <configuration>
                            <archive>
                                <manifestEntries>
                                    <Multi-Release>true</Multi-Release>
                                </manifestEntries>
                            </archive>
                            <excludes>
                                <exclude>**/javac*</exclude>
                                <exclude>**/org.codehaus.plexus.compiler.javac.JavacCompiler*arguments</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
