<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>uk.co.rgordon</groupId>
        <artifactId>oj-parent</artifactId>
        <version>1.6.0</version>
    </parent>

    <artifactId>oj-net</artifactId>

    <name>Oddjob Net</name>
    <description>Oddjob Network Jobs (Currently Only FTP)</description>
    <url>http://rgordon.co.uk/oddjob</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>rob</id>
            <name>Rob</name>
            <email>contact@rgordon.co.uk</email>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/robjg/oj-net</url>
        <connection>scm:git:git://github.com/robjg/oj-net.git</connection>
    </scm>

    <profiles>
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <skip.integration.tests>true</skip.integration.tests>
                <skipTests>false</skipTests>
            </properties>
        </profile>
        <profile>
            <id>integration-test</id>
            <properties>
                <skip.integration.tests>false</skip.integration.tests>
                <skipTests>true</skipTests>
            </properties>
        </profile>
    </profiles>

    <properties>
        <commons-net.version>3.4</commons-net.version>
        <integration.test.tag>IntegrationTest</integration.test.tag>
    </properties>

    <dependencies>
        <dependency>
            <groupId>commons-net</groupId>
            <artifactId>commons-net</artifactId>
            <version>${commons-net.version}</version>
        </dependency>

        <dependency>
            <groupId>uk.co.rgordon</groupId>
            <artifactId>oddjob</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>uk.co.rgordon</groupId>
            <artifactId>run-oddjob</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>uk.co.rgordon</groupId>
            <artifactId>arooa</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.ftpserver</groupId>
            <artifactId>ftpserver-core</artifactId>
            <version>1.0.6</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>

        <plugins>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/assembly/oddball.xml</descriptor>
                    </descriptors>
                    <finalName>oddball</finalName>
                    <appendAssemblyId>false</appendAssemblyId>
                    <attach>false</attach>
                </configuration>
                <executions>
                    <execution>
                        <id>oddball</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>${skipTests}</skipTests>
                    <excludedGroups>${integration.test.tag}</excludedGroups>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <skipTests>${skip.integration.tests}</skipTests>
                    <groups>${integration.test.tag}</groups>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

</project>
