<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.kohlschutter.jdk.compiler</groupId>
        <artifactId>compiler-home</artifactId>
        <version>1.0.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>com.kohlschutter.jdk</groupId>
    <artifactId>standalone-home</artifactId>
    <properties>
        <maven.compiler.release>11</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <file.encoding>UTF-8</file.encoding>
        <maven.compile.encoding>UTF-8</maven.compile.encoding>
        <xlint.compiler.arg>-Xlint:none</xlint.compiler.arg>
        <spotbugs.disabled>true</spotbugs.disabled>
        <javadoc.strict>false</javadoc.strict>

        <javahome.dir></javahome.dir>
    </properties>

    <profiles>
        <profile>
            <id>slim-default-jar</id>
            <activation>
                <property>
                    <name>classifier</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <?m2e ignore?>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>extract-modules</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <mainClass>
                                com.kohlschutter.jdk.buildutil.JavaHomeExtractor</mainClass>
                            <workingDirectory>/tmp</workingDirectory>
                            <arguments>
                                <argument>${javahome.dir}</argument>
                                <argument>${project.build.directory}/classes</argument>
                            </arguments>
                            <includePluginDependencies>true</includePluginDependencies>
                            <executableDependency>
                                <groupId>com.kohlschutter.jdk</groupId>
                                <artifactId>build-util</artifactId>
                            </executableDependency>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>com.kohlschutter.jdk</groupId>
                                <artifactId>build-util</artifactId>
                                <version>${project.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>classifier-jar</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <classifier>${classifier}</classifier>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-jar</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier></classifier>
                            <includes>
                                <include>META-INF/**</include>
                                <include>module-info.class</include>
                                <include>
                                    com/kohlschutter/jdk/home/JavaHome.class</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>de.thetaphi</groupId>
                <artifactId>forbiddenapis</artifactId>
                <executions>
                    <execution>
                        <id>default</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>skip</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>checkstyle-during-compile</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>skip</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>skip</phase>
                    </execution>
                    <execution>
                        <id>default-cpd-check</id>
                        <goals>
                            <goal>cpd-check</goal>
                        </goals>
                        <phase>skip</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>spotbugs-during-install</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>skip</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
    </dependencies>
</project>
