<?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">
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>5</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.jfarcand</groupId>
    <artifactId>wcs</artifactId>
    <name>WebSocket Client Library for Scala</name>
    <version>1.3</version>
    <packaging>jar</packaging>
    <description>
        A simple WebSocket Client for Scala
    </description>
    <url>http://github.com/jfarcand/wsc</url>
    <scm>
        <connection>scm:git:git@github.com:jfarcand/WCS.git</connection>
        <url>https://github.com/jfarcand/WCS.git</url>
        <developerConnection>scm:git:git@github.com:jfarcand/WCS.git</developerConnection>
    </scm>
    <issueManagement>
        <system>github</system>
        <url>ihttps://github.com/jfarcand/WCS/issues</url>
    </issueManagement>

    <prerequisites>
        <maven>2.0.9</maven>
    </prerequisites>
    <developers>
        <developer>
            <id>jfarcand</id>
            <name>Jeanfrancois Arcand</name>
            <email>jfarcand@apache.org</email>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <dependencies>
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>async-http-client</artifactId>
            <version>1.7.6</version>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_2.9.1</artifactId>
            <version>1.6.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>0.9.26</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>7.6.0.v20120127</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>7.6.0.v20120127</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-websocket</artifactId>
            <version>7.6.0.v20120127</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlets</artifactId>
            <version>7.6.0.v20120127</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-compiler</artifactId>
            <version>2.9.1</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <testSourceDirectory>src/test/java</testSourceDirectory>
        <extensions>
            <!-- Enabling the use of SSH -->
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh-external</artifactId>
                <version>1.0-beta-6</version>
            </extension>
        </extensions>
        <defaultGoal>install</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8.1</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <source>1.6</source>
                    <encoding>UTF-8</encoding>
                    <maxmemory>1g</maxmemory>
                    <links>
                        <link>http://java.sun.com/javase/6/docs/api/</link>
                    </links>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>${source.property}</source>
                    <target>${target.property}</target>
                    <maxmem>1024m</maxmem>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>1.2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>all</shadedClassifierName>
                            <artifactSet>
                                <excludes>
                                    <exclude>commons-codec:commons-codec</exclude>
                                    <exclude>commons-lang:commons-lang</exclude>
                                    <exclude>commons-logging:commons-logging</exclude>
                                    <exclude>junit:junit</exclude>
                                    <exclude>log4j:log4j</exclude>
                                    <exclude>commons-httpclient:commons-httpclient</exclude>
                                    <exclude>org.scala-lang:scala-library</exclude>
                                    <exclude>org.scala-lang:scala-compiler</exclude>
                                </excludes>
                            </artifactSet>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.3.4</version>
                <extensions>true</extensions>
                <configuration>
                    <manifestLocation>META-INF</manifestLocation>
                    <instructions>
                        <Bundle-Version>$(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm))
                        </Bundle-Version>
                        <Bundle-Vendor>jfarcand</Bundle-Vendor>
                        <Import-Package>
                            *
                        </Import-Package>
                        <Export-Package>
                            org.jfarcand.*;version="$(replace;$(project.version);-SNAPSHOT;"")"
                        </Export-Package>
                    </instructions>
                </configuration>
                <executions>
                    <execution>
                        <id>osgi-bundle</id>
                        <phase>package</phase>
                        <goals>
                            <goal>bundle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4.3</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <version>2.15.2</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <jvmArgs>
                        <jvmArg>-Xmx384m</jvmArg>
                    </jvmArgs>
                    <args>
                        <arg>-target:jvm-1.5</arg>
                        <arg>-deprecation</arg>
                    </args>
                    <launchers>
                        <launcher>
                            <id>run-scalatest</id>
                            <mainClass>org.scalatest.tools.Runner</mainClass>
                            <args>
                                <arg>-p</arg>
                                <arg>${project.build.testOutputDirectory}</arg>
                            </args>
                            <jvmArgs>
                                <jvmArg>-Xmx512m</jvmArg>
                            </jvmArgs>
                        </launcher>
                    </launchers>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <outputDirectory>target/site</outputDirectory>
        <plugins>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
            </plugin>
            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8.1</version>
            <configuration>
                <aggregate>true</aggregate>
                <source>1.6</source>
                <encoding>UTF-8</encoding>
                <maxmemory>1g</maxmemory>
                <links>
                    <link>http://java.sun.com/javase/6/docs/api/</link>
                </links>
                <bootclasspath>${sun.boot.class.path}</bootclasspath>
                <doclet>com.google.doclava.Doclava</doclet>
                <useStandardDocletOptions>false</useStandardDocletOptions>
                <additionalJOption>-J-Xmx1024m</additionalJOption>
                <docletArtifact>
                    <groupId>com.google.doclava</groupId>
                    <artifactId>doclava</artifactId>
                    <version>1.0.3</version>
                </docletArtifact>
                <additionalparam>
                    -hdf project.name "${project.name} ${project.version}"
                    -d ${project.reporting.outputDirectory}/apidocs
                </additionalparam>
            </configuration>
            </plugin>
        </plugins>
    </reporting>
    <distributionManagement>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype Release</name>
            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>sonatype-nexus-snapshots</name>
            <url>${distMgmtSnapshotsUrl}</url>
        </snapshotRepository>
    </distributionManagement>
    <properties>
        <distMgmtSnapshotsUrl>http://oss.sonatype.org/content/repositories/snapshots</distMgmtSnapshotsUrl>
        <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
        <source.property>1.6</source.property>
        <target.property>1.6</target.property>
    </properties>
</project>

