<?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>2.3.0.Final</version>
    </parent>

    <!-- TODO Donate this addon to Forge. -->

    <artifactId>decompiler-procyon</artifactId>

    <name>Windup Engine - Decompiler Procyon</name>

    <properties>
        <version.procyon>2.3.0.Final</version.procyon>
    </properties>

    <dependencies>

        <!-- Local Dependencies -->
        <dependency>
            <groupId>org.jboss.windup.decompiler.procyon</groupId>
            <artifactId>procyon-core</artifactId>
            <version>${version.procyon}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.windup.decompiler.procyon</groupId>
            <artifactId>procyon-compilertools</artifactId>
            <version>${version.procyon}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.0</version>
        </dependency>

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

        <!-- Test Dependencies -->
        <dependency>
            <groupId>org.jboss.windup.decompiler</groupId>
            <artifactId>decompiler-api</artifactId>
            <type>test-jar</type>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Test jar -->
        <dependency>
            <groupId>org.apache.wicket</groupId>
            <artifactId>wicket-core</artifactId>
            <version>6.11.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Copy Wicket Core jar as a test .jar for use in decompilation test cases. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.wicket</groupId>
                                    <artifactId>wicket-core</artifactId>
                                    <version>6.11.0</version>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>target/TestJars</outputDirectory>
                            <destFileName>wicket-core-6.11.0</destFileName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <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>
                    <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>
