<?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>
    <parent>
        <groupId>com.ixaris.oss</groupId>
        <artifactId>ixaris-commons-async</artifactId>
        <version>1.5.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>ixaris-commons-async-transformer</artifactId>
    <dependencies>
        <dependency>
            <groupId>org.kohsuke.metainf-services</groupId>
            <artifactId>metainf-services</artifactId>
            <version>1.7</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.1.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>nodeps</shadedClassifierName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>java-8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.sun</groupId>
                    <artifactId>tools</artifactId>
                    <version>1.8.0</version>
                    <scope>system</scope>
                    <systemPath>${java.home}/../lib/tools.jar</systemPath>
                </dependency>
                <dependency>
                    <groupId>com.sun</groupId>
                    <artifactId>rt</artifactId>
                    <version>1.8.0</version>
                    <scope>system</scope>
                    <systemPath>${java.home}/../jre/lib/rt.jar</systemPath>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>java-10</id>
            <activation>
                <jdk>10</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <compilerArgs>
                                <arg>--add-exports</arg>
                                <arg>jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
                                <arg>--add-exports</arg>
                                <arg>jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
                                <arg>--add-exports</arg>
                                <arg>jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
                                <arg>--add-exports</arg>
                                <arg>java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED</arg>
                                <arg>--add-exports</arg>
                                <arg>java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED</arg>
                                <arg>--add-exports</arg>
                                <arg>java.base/jdk.internal.org.objectweb.asm.tree.analysis=ALL-UNNAMED</arg>
                            </compilerArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
