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

    <groupId>org.whitesource</groupId>
    <artifactId>wss-unified-agent</artifactId>
    <version>18.12.2</version>
    <packaging>pom</packaging>

    <name>WhiteSource Unified Agent</name>
    <description>Unified Agent is a simple java command line tool which extracts descriptive information from your open source libraries</description>
    <url>https://github.com/whitesource/unified-agent</url>

    <modules>
        <module>unified-agent-utils</module>
        <module>unified-agent-main</module>
    </modules>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <agent.api.version>2.9.5</agent.api.version>
        <slf4j.version>1.7.5</slf4j.version>
        <skipTests>false</skipTests>
    </properties>

    <organization>
        <name>WhiteSource Software</name>
        <url>http://whitesourcesoftware.com/</url>
    </organization>
    <inceptionYear>2014</inceptionYear>

    <licenses>
        <license>
            <name>WhiteSource Software License</name>
            <url>https://s3.amazonaws.com/unified-agent/LICENSE.txt</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:whitesource/unified-agent.git</connection>
        <developerConnection>scm:git:git@github.com:whitesource/unified-agent.git</developerConnection>
        <url>git@github.com:whitesource/unified-agent.git</url>
        <tag>wss-unified-agent-18.12.2</tag>
    </scm>
    <issueManagement>
        <url>https://github.com/whitesource/unified-agent/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <developers>
        <developer>
            <id>anna.rozin</id>
            <name>Anna Rozin</name>
            <email>anna.rozin@whitesourcesoftware.com</email>
        </developer>
        <developer>
            <id>tom.shapira</id>
            <name>Tom Shapira</name>
            <email>tom.shapira@whitesourcesoftware.com</email>
        </developer>
    </developers>

    <dependencies>
        <!-- Test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.3</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>

            <resource>
                <directory>.</directory>
                <includes>
                    <include>README.md</include>
                    <include>README.EUA.md</include>
                    <include>LICENSE-UA.txt</include>
                    <include>LICENSE-3RD-PARTY.txt</include>
                    <include>LICENSE-3RD-PARTY.txt</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20.1</version>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <!--<plugin>-->
                <!--<artifactId>maven-assembly-plugin</artifactId>-->
                <!--<version>2.4</version>-->
                <!--<configuration>-->
                    <!--<archive>-->
                        <!--<manifest>-->
                            <!--<mainClass>org.whitesource.fs.Main</mainClass>-->
                        <!--</manifest>-->
                    <!--</archive>-->
                    <!--<descriptorRefs>-->
                        <!--<descriptorRef>jar-with-dependencies</descriptorRef>-->
                    <!--</descriptorRefs>-->
                    <!--<finalName>wss-unified-agent-${project.version}</finalName>-->
                    <!--<appendAssemblyId>false</appendAssemblyId>-->
                <!--</configuration>-->
                <!--<executions>-->
                    <!--<execution>-->
                        <!--<id>make-assembly</id>-->
                        <!--<phase>package</phase>-->
                        <!--<goals>-->
                            <!--<goal>single</goal>-->
                        <!--</goals>-->
                    <!--</execution>-->
                <!--</executions>-->
            <!--</plugin>-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.4</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <arguments>-Dgpg.passphrase=${passed.gpg.passphrase} -Dgpg.homedir=${passed.gpg.homedir}</arguments>
                    <releaseProfiles>Release</releaseProfiles>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.whitesource</groupId>
                    <artifactId>whitesource-maven-plugin</artifactId>
                    <version>3.2.5</version>
                    <configuration>
                        <orgToken>${whitesource.orgToken}</orgToken>
                        <product>File System Agent</product>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>ci-build</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <quiet>true</quiet>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <homedir>${gpg.homedir}</homedir>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>Release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.github</groupId>
                        <artifactId>site-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                                <phase>site</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype staging repository</name>
            <uniqueVersion>false</uniqueVersion>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype snapshots repository</name>
            <uniqueVersion>false</uniqueVersion>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
</project>
