<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</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>22</version>
        <relativePath />
    </parent>

    <groupId>org.jboss.windup.plugin</groupId>
    <artifactId>windup-maven-plugin-parent</artifactId>
    <version>6.3.9.Final</version>
    <packaging>pom</packaging>

    <name>Windup Maven Plugin - Parent</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>

        <version.windupcore>6.3.9.Final</version.windupcore>
        <version.windup-rulesets>6.3.9.Final</version.windup-rulesets>
        <!-- For now, we need to pass this to the Mojo explicitly (through META-INF/versions.properties),
             but it should be possible to figure that out from the Windup POM. -->
        <version.forge>3.10.0.Final</version.forge>
        <version.furnace>2.29.1.Final</version.furnace>
    </properties>

    <url>http://windup.jboss.org</url>

    <licenses>
        <license>
            <name>Eclipse Public License version 1.0</name>
            <url>http://www.eclipse.org/legal/epl-v10.html</url>
        </license>
    </licenses>
    
    <scm>
        <tag>master</tag>
        <url>http://github.com/windup/windup-maven-plugin</url>
        <connection>scm:git:https://github.com/windup/windup-maven-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:windup/windup-maven-plugin.git</developerConnection>
    </scm>

    <organization>
        <name>JBoss by Red Hat</name>
        <url>http://www.jboss.org</url>
    </organization>
    
    <issueManagement>
        <system>JBoss Jira</system>
        <url>https://issues.jboss.org/browse/WINDUP</url>
    </issueManagement>
    
    <mailingLists>
        <mailingList>
            <name>Windup Rules Development and Usage</name>
            <post>windup-users@lists.jboss.org</post>
            <archive>http://lists.jboss.org/pipermail/windup-users/</archive>
        </mailingList>
        <mailingList>
            <name>Windup Core Development</name>
            <post>windup-dev@lists.jboss.org</post>
            <archive>http://lists.jboss.org/pipermail/windup-dev/</archive>
        </mailingList>
    </mailingLists>
    
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jboss.windup</groupId>
                <artifactId>windup-bom</artifactId>
                <version>${version.windupcore}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>

        <!-- Maven plugin API -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>3.9.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>3.9.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.8.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.4.1</version>
        </dependency>
            <!-- Logging and tests -->
            <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>

        <!-- Windup dependencies -->
        <!-- This should be the addon which contains all the core Windup dependencies you need to run Windup. -->
        <dependency>
            <groupId>org.jboss.windup</groupId>
            <artifactId>windup-tooling</artifactId>
            <classifier>forge-addon</classifier>
        </dependency>

        <!-- Rules and data -->
        <dependency>
            <groupId>org.jboss.windup.maven</groupId>
            <artifactId>nexus-indexer-data</artifactId>
            <type>zip</type>
        </dependency>

        <dependency>
            <groupId>org.jboss.windup.rules.apps</groupId>
            <artifactId>windup-rules-java-project</artifactId>
            <classifier>forge-addon</classifier>
        </dependency>

        <dependency>
            <groupId>org.jboss.windup.rules.apps</groupId>
            <artifactId>windup-rules-tattletale</artifactId>
            <classifier>forge-addon</classifier>
            <scope>provided</scope> <!-- Only needs a constant. -->
        </dependency>



            <!-- Furnace -->
            <dependency>
            <groupId>org.jboss.forge.furnace</groupId>
            <artifactId>furnace-se</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.forge.furnace</groupId>
            <artifactId>furnace-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.forge.furnace.container</groupId>
            <!-- Windup switched from :cdi to :simple due to problems with Titan classloading. -->
            <artifactId>simple</artifactId>
            <classifier>forge-addon</classifier>
        </dependency>

            <!-- Forge -->
            <dependency>
            <groupId>org.jboss.forge.addon</groupId>
            <artifactId>core</artifactId>
            <classifier>forge-addon</classifier>
            <exclusions>
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>3.3.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-archiver</artifactId>
            <version>4.8.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.eclipse.platform</groupId>
            <artifactId>org.eclipse.core.resources</artifactId>
            <version>3.13.200</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.platform</groupId>
            <artifactId>org.eclipse.text</artifactId>
            <version>3.8.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.platform</groupId>
            <artifactId>org.eclipse.equinox.common</artifactId>
            <version>3.14.100</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>run-integration-test</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <artifactId>maven-invoker-plugin</artifactId>
                            <version>1.10</version>
                            <configuration>
                                <debug>true</debug>
                                <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                                <pomIncludes>
                                    <pomInclude>*/pom.xml</pomInclude>
                                </pomIncludes>
                                <postBuildHookScript>verify</postBuildHookScript>
                                <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                                <settingsFile>src/it/settings.xml</settingsFile>
                                <goals>
                                    <goal>clean</goal>
                                    <goal>test-compile</goal>
                                </goals>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>integration-test</id>
                                    <goals>
                                        <goal>install</goal>
                                        <goal>integration-test</goal>
                                        <goal>verify</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <inherited>false</inherited>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <phase/>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>java9+</id>
            <activation>
                <jdk>[9,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>3.0.0</version>
                        <configuration>
                            <argLine>--add-modules=java.se --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.stream=ALL-UNNAMED</argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>windup</id>
            <activation>
                <property>
                    <name>!skipThemeWindup</name>
                </property>
            </activation>
            <modules>
                <module>windup-plugin</module>
            </modules>
        </profile>
        <profile>
            <id>mtr</id>
            <modules>
                <module>mtr-plugin</module>
            </modules>
        </profile>
        <profile>
            <id>mta</id>
            <modules>
                <module>mta-plugin</module>
            </modules>
        </profile>
    </profiles>
</project>
