<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>at.datenwort.commons</groupId>
        <artifactId>first-class-property</artifactId>
        <version>1.3</version>
    </parent>

    <artifactId>first-class-property-runtime</artifactId>
    <version>1.3</version>
    <packaging>jar</packaging>

    <name>FirstClassProperty Runtime</name>

    <properties>
        <byte-buddy.version>1.15.7</byte-buddy.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>at.datenwort.commons</groupId>
            <artifactId>first-class-property-processor</artifactId>
            <version>1.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>${byte-buddy.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy-agent</artifactId>
            <version>${byte-buddy.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.30.2-GA</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.17.0</version>
        </dependency>
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <version>3.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>at.datenwort.commons</groupId>
            <artifactId>agents-from-service-api</artifactId>
            <version>0.3</version>
        </dependency>
        <dependency>
            <groupId>at.datenwort.commons</groupId>
            <artifactId>agents-from-service-impl</artifactId>
            <version>0.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <proc>full</proc>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.5.1</version>
                <executions>
                    <execution>
                        <id>copy-agent</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>at.datenwort.commons</groupId>
                                    <artifactId>agents-from-service-impl</artifactId>
                                    <version>0.3</version>
                                    <outputDirectory>${project.build.directory}/agents</outputDirectory>
                                    <destFileName>agents-from-service-impl.jar</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>
                        -XX:+ShowCodeDetailsInExceptionMessages
                        -Dfile.encoding=UTF-8
                        -javaagent:${project.build.directory}/agents/agents-from-service-impl.jar
                    </argLine>
                    <systemPropertyVariables>
                        <java.awt.headless>true</java.awt.headless>
                    </systemPropertyVariables>
                    <useSystemClassLoader>true</useSystemClassLoader>
                    <forkCount>1</forkCount>
                    <useUnlimitedThreads>false</useUnlimitedThreads>
                    <threadCount>1</threadCount>
                    <reuseForks>false</reuseForks>
                    <trimStackTrace>false</trimStackTrace>
                </configuration>
            </plugin>

        </plugins>
    </build>
</project>
