<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2010, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<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.wildfly.legacy.test</groupId>
        <artifactId>wildfly-legacy-spi-parent</artifactId>
        <version>1.0.0.Alpha9</version>
    </parent>

    <artifactId>wildfly-legacy-spi-dependencies</artifactId>

    <name>WildFly: Legacy Test SPI Dependencies</name>
    <description>
        Current wildfly-core classes used by the SPI to avoid needing to bring in classes from WildFly (the consumer)
        to avoid circular dependencies
    </description>
    <packaging>pom</packaging>

    <properties>
        <wildfly.lib.directory>${project.build.sourceDirectory}/../../../lib</wildfly.lib.directory>
    </properties>

    <dependencies>
        <!--
          Jars built from current wildfly-core needed to get things to compile. We cannot add normal maven
          dependencies on these since they are in SNAPSHOT and also this would cause circular dependencies.
          WildFly core is a consumer of this project.
        -->
        <dependency>
            <groupId>org.wildfly.legacy.test.direct</groupId>
            <artifactId>wildfly-controller</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${wildfly.lib.directory}/wildfly-controller.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.wildfly.legacy.test.direct</groupId>
            <artifactId>wildfly-core-model-test-framework</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${wildfly.lib.directory}/wildfly-core-model-test-framework.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.wildfly.legacy.test.direct</groupId>
            <artifactId>wildfly-deployment-repository</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${wildfly.lib.directory}/wildfly-deployment-repository.jar</systemPath>
        </dependency>
        <!--
       <dependency>
          <groupId>org.wildfly.legacy.test.direct</groupId>
          <artifactId>wildfly-host-controller</artifactId>
          <version>1.0</version>
          <scope>system</scope>
          <systemPath>${wildfly.lib.directory}/wildfly-host-controller-${wildfly.current.version}.jar</systemPath>
       </dependency>
        -->
        <dependency>
            <groupId>org.wildfly.legacy.test.direct</groupId>
            <artifactId>wildfly-model-test</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${wildfly.lib.directory}/wildfly-model-test.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.wildfly.legacy.test.direct</groupId>
            <artifactId>wildfly-server</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${wildfly.lib.directory}/wildfly-server.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.wildfly.legacy.test.direct</groupId>
            <artifactId>wildfly-subsystem-test-framework</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${wildfly.lib.directory}/wildfly-subsystem-test-framework.jar</systemPath>
        </dependency>
       
        <!-- Other non wildfly-core dependencies needed to get things to compile -->
        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>jboss-dmr</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.msc</groupId>
            <artifactId>jboss-msc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>jboss-vfs</artifactId>
        </dependency>
      
    </dependencies>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${wildfly.lib.directory}</directory>
                            <followSymlinks>false</followSymlinks>
                            <useDefaultExcludes>true</useDefaultExcludes>
                            <includes>
                                <include>**</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.wildfly.core</groupId>
                                    <artifactId>wildfly-controller</artifactId>
                                    <version>${wildfly.current.version}</version>
                                    <type>jar</type>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wildfly.core</groupId>
                                    <artifactId>wildfly-model-test</artifactId>
                                    <version>${wildfly.current.version}</version>
                                    <type>jar</type>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wildfly.core</groupId>
                                    <artifactId>wildfly-core-model-test-framework</artifactId>
                                    <version>${wildfly.current.version}</version>
                                    <type>jar</type>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wildfly.core</groupId>
                                    <artifactId>wildfly-deployment-repository</artifactId>
                                    <version>${wildfly.current.version}</version>
                                    <type>jar</type>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wildfly.core</groupId>
                                    <artifactId>wildfly-server</artifactId>
                                    <version>${wildfly.current.version}</version>
                                    <type>jar</type>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wildfly.core</groupId>
                                    <artifactId>wildfly-subsystem-test-framework</artifactId>
                                    <version>${wildfly.current.version}</version>
                                    <type>jar</type>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${wildfly.lib.directory}</outputDirectory>
                            <overWriteReleases>true</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <stripClassifier>true</stripClassifier>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
