<?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>org.jboss.windup.decompiler</groupId>
        <artifactId>decompiler-parent</artifactId>
        <version>4.0.0.Final</version>
    </parent>

    <!-- TODO Donate this addon to Forge. -->
    <artifactId>decompiler-api</artifactId>
    <name>Windup Engine - Decompiler API</name>

    <dependencies>
        <!-- Local Dependencies -->

        <!-- Addon Dependencies -->
        <dependency>
            <groupId>org.jboss.windup.utils</groupId>
            <artifactId>windup-utils</artifactId>
            <classifier>forge-addon</classifier>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <!-- Supress test jar copying in parent. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <inherited>false</inherited>
                <executions>
                    <execution>
                        <id>decompiler.copy-test-jar</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>

            <!-- Forge stuff -->
            <plugin>
                <groupId>org.jboss.forge.furnace</groupId>
                <artifactId>furnace-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-dot</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>generate-dot</goal>
                        </goals>
                        <configuration>
                            <attach>true</attach>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <!-- Package the tests to an artifact so they can be reused. -->
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                    <!-- Forge stuff -->
                    <execution>
                        <id>create-forge-addon</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>forge-addon</classifier>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
