<!-- **************************************************************************
#
# Copyright (c) 2004-2012 Oracle Corporation.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors: 
#
#   Kohsuke Kawaguchi, Daniel Dyer, Stephen Connolly, Winston Prakash
#        
#************************************************************************** --> 

<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.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
        <relativePath /> <!-- avoid cycle -->
    </parent>

    <groupId>org.eclipse.hudson</groupId>
    <artifactId>hudson-remoting</artifactId>
    <version>3.0.4-SNAPSHOT</version>
    <packaging>jar</packaging>
    
    <name>Hudson :: Remoting Layer</name>
    <description>
        Contains the bootstrap code to bridge separate JVMs into a single semi-shared space.
        Reusable outside Hudson.
    </description>

    <properties>
        <junit.version>4.8.1</junit.version>
        <commons-io.version>2.0.1</commons-io.version>
        <asm-all.version>2.2.3</asm-all.version>
        <commons-codec.version>1.4</commons-codec.version>
        <args4j.version>2.0.16</args4j.version>
        <hudson.sign.alias>hudson</hudson.sign.alias>
        <hudson.sign.keystore>dummy.keystore</hudson.sign.keystore>
        <hudson.sign.storepass>hudson</hudson.sign.storepass>
        <cbi-plugins.version>1.1.1</cbi-plugins.version>
    </properties>
    
    <licenses>
        <license>
            <name>Eclipse Public License v1.0</name>
            <url>http://www.eclipse.org/legal/epl-v10.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    
    <scm>
        <connection>scm:git:git://git.eclipse.org/gitroot/hudson/org.eclipse.hudson.remoting.git</connection>
        <developerConnection>scm:git:git://git.eclipse.org/gitroot/hudson/org.eclipse.hudson.remoting.git</developerConnection>
        <url>http://git.eclipse.org/c/hudson/org.eclipse.hudson.remoting.git/</url>
    </scm>
    
    <pluginRepositories>
        <pluginRepository>
            <id>eclipse-maven</id>
            <url>https://repo.eclipse.org/content/repositories/releases/</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <configuration>
                    <threshold>High</threshold>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <configuration>
                    <!--rulesets> <ruleset>ruleset.xml</ruleset> </rulesets -->
                    <targetJdk>1.5</targetJdk>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>hudson.remoting.Launcher</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Version>${project.version}</Version>
                            <Permissions>all-permissions</Permissions>
                            <Codebase>*</Codebase>
                            <Application-Name>Hudson Slave Agent</Application-Name>
                            <Trusted-Library>true</Trusted-Library>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            
            <!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jarsigner-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <alias>${hudson.sign.alias}</alias>
                            <storepass>${hudson.sign.storepass}</storepass>
                            <keystore>${hudson.sign.keystore}</keystore>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            -->

            <plugin>
                <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
                <artifactId>maven-antrun-extended-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- rejar args4j contents -->
                        <id>process-classes</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <resolveArtifact artifactId="args4j" property="args4j.jar" />
                                <unjar src="${args4j.jar}" dest="target/classes" />
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>args4j</groupId>
            <artifactId>args4j</artifactId>
            <version>${args4j.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>${commons-codec.version}</version>
        </dependency>
        
        <!-- test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>asm</groupId>
            <artifactId>asm-all</artifactId>
            <version>${asm-all.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <properties>
                <!-- for releases, just use the POM version. See above ant-run plugin for how this gets used. -->
                <build.version>${project.version}</build.version>
            </properties>
        </profile>
        <profile>
            <id>hudson</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>cobertura-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>eclipse-sign</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.eclipse.cbi.maven.plugins</groupId>
                        <artifactId>eclipse-jarsigner-plugin</artifactId>
                        <version>${cbi-plugins.version}</version>
                        <executions>
                            <execution>
                                <id>sign</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
