<!--
  ~ Copyright (C) 2012 White Source Ltd.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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>org.jenkins-ci.plugins</groupId>
        <artifactId>plugin</artifactId>
        <version>2.8</version>
    </parent>

    <artifactId>whitesource</artifactId>
    <version>1.7.2</version>
    <packaging>hpi</packaging>

    <name>White Source Jenkins plugin</name>
    <description>White Source external update agent for Jenkins CI</description>
    <url>https://wiki.jenkins-ci.org/display/JENKINS/Whitesource+Plugin/</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>
    <scm>
        <connection>scm:git:git://github.com/jenkinsci/whitesource-plugin.git</connection>
        <developerConnection>scm:git:https://github.com/jenkinsci/whitesource-plugin.git</developerConnection>
        <url>http://github.com/jenkinsci/whitesource-plugin</url>
      <tag>release-tag-1.7.2</tag>
  </scm>
    <organization>
        <name>White Source</name>
        <url>http://www.whitesourcesoftware.com/</url>
    </organization>
    <developers>
        <developer>
            <id>itaimarko</id>
            <name>Itai Marko</name>
            <email>itai.marko@whitesourcesoftware.com</email>
            <organization>White Source</organization>
            <url>http://www.whitesourcesoftware.com/</url>
            <roles>
                <role>Lead Developer</role>
            </roles>
        </developer>
        <developer>
            <id>annarozin</id>
            <name>Anna Rozin</name>
            <email>anna.rozin@whitesourcesoftware.com</email>
            <organization>White Source</organization>
            <url>http://www.whitesourcesoftware.com/</url>
            <roles>
                <role>Software Developer</role>
            </roles>
        </developer>
        <developer>
            <id>sramakrishna</id>
            <name>Ramakrishna Sharvirala</name>
            <email>ramakrishna.sharvirala@gmail.com</email>
        </developer>
    </developers>

    <properties>
        <jenkins.version>1.609.3</jenkins.version>
        <java.level>6</java.level>
        <agent.version>2.3.0</agent.version>
        <skipTests>true</skipTests>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.whitesource</groupId>
            <artifactId>wss-agent-api-client</artifactId>
            <version>${agent.version}</version>
        </dependency>
        <dependency>
            <groupId>org.whitesource</groupId>
            <artifactId>wss-agent-report</artifactId>
            <version>${agent.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jenkins-ci.main</groupId>
            <artifactId>maven-plugin</artifactId>
            <version>2.8</version>
        </dependency>
        <dependency>
            <groupId>org.jenkinsci.plugins</groupId>
            <artifactId>git</artifactId>
            <version>1.1.14</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.4</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jenkins-ci.tools</groupId>
                <artifactId>maven-hpi-plugin</artifactId>
                <version>1.112</version>
                <configuration>
                    <pluginFirstClassLoader>true</pluginFirstClassLoader>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.whitesource</groupId>
                    <artifactId>whitesource-maven-plugin</artifactId>
                    <version>1.1.6</version>
                    <configuration>
                        <orgToken>${whitesource.orgToken}</orgToken>
                        <checkPolicies>true</checkPolicies>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.3</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>3.0.3</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
	
	<profiles>
		<profile>
            <id>Release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.github</groupId>
                        <artifactId>site-maven-plugin</artifactId>
                        <version>0.8</version>
                        <configuration>
                            <server>github</server>
                            <merge>true</merge>
                            <force>true</force>
                            <message>Building site for ${project.artifactId} - ${project.version}</message>
                            <excludes>
                                <exclude>assembly</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>github-pages</id>
                                <phase>site</phase>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.3</version>
                        <configuration>
                            <source>1.6</source>
                            <target>1.6</target>
                        </configuration>
                    </plugin>



                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>findbugs-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>findbugs</id>
                                <configuration>

                                    <!--<excludeFilterFile>${project.basedir}/src/findbugs/excludesFilter.xml</excludeFilterFile>-->
                                    <classFilesDirectory>${project.basedir}/test</classFilesDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
	</profiles>

    <!-- get every artifact through repo.jenkins-ci.org, which proxies all the
         artifacts that we need -->
    <repositories>
        <repository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </pluginRepository>
    </pluginRepositories>
</project>
