<?xml version="1.0" encoding="UTF-8"?>
<!--
 * JBoss, Home of Professional Open Source
 *
 * Copyright 2009, Red Hat Middleware LLC, and individual contributors
 * by the @author tags. See the COPYRIGHT.txt in the distribution for a
 * full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-->
<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>
  <groupId>org.jboss.serialization</groupId>
  <artifactId>jboss-serialization</artifactId>
  <packaging>jar</packaging>
  <version>1.1.0.Beta1</version>

  <name>JBoss Serialization</name>
  <url>http://www.jboss.org/serialization/</url>
  <description>
    JBoss Serialization is a new approach to Java object serialization.
  </description>

  <organization>
    <name>JBoss, a division of Red Hat</name>
    <url>http://www.jboss.org/</url>
  </organization>
  <licenses>
    <license>
      <name>GNU Lesser General Public License</name>
      <url>http://www.gnu.org/licenses/lgpl.html</url>
    </license>
  </licenses>
  <inceptionYear>2006</inceptionYear>

  <properties>
    <!-- FIXME: Couldn't figure out how to configure jrunit correctly yet.
                Run 'ant run-tests' or 'ant run-performance-tests' instead. -->
    <maven.test.skip>true</maven.test.skip>
  </properties>
  <scm>
    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossserialization/trunk</connection>
    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossserialization/trunk</developerConnection>
  </scm>

  <dependencies>
    <dependency>
      <groupId>trove</groupId>
      <artifactId>trove</artifactId>
      <version>2.1.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.15</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>mail</artifactId>
          <groupId>javax.mail</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jms</artifactId>
          <groupId>javax.jms</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jmxtools</artifactId>
          <groupId>com.sun.jdmk</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jmxri</artifactId>
          <groupId>com.sun.jmx</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Testing frameworks and related dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant-junit</artifactId>
      <version>1.7.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jboss</groupId>
      <artifactId>jrunit</artifactId>
      <version>1.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate</artifactId>
      <version>3.1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jboss.profiler.jvmti</groupId>
      <artifactId>jboss-profiler-jvmti</artifactId>
      <version>1.0.0.CR5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jboss</groupId>
      <artifactId>jbossall-client</artifactId>
      <version>4.2.2.GA</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.aop</groupId>
      <artifactId>jboss-aop</artifactId>
      <version>2.1.0.GA</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jgroups</groupId>
      <artifactId>jgroups</artifactId>
      <version>2.6.10.GA</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>1.6</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <encoding>UTF-8</encoding>
          <source>1.5</source>
          <target>1.5</target>
          <debug>true</debug>
          <optimize>true</optimize>
          <showDeprecations>true</showDeprecations>
        </configuration>
      </plugin>
      <!--
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.4.3</version>
        <configuration>
          <forkMode>never</forkMode>
          <excludes>
            <exclude>**/*</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jrunit-plugin</artifactId>
        <version>1.0</version>
        <executions>
          <execution>
            <id>jrunit-test</id>
            <phase>test</phase>
            <configuration>
              <fileReceiverDir>${basedir}/target</fileReceiverDir>
              <reportFormat>xml</reportFormat>
              <forkMode>pertest</forkMode>
              <includes>
                <include>**/*TestCase.java</include>
              </includes>
              <excludes>
                <exclude>**/MemoryLeakTestCase.java</exclude>
              </excludes>
              <jvm>${env.JAVA_HOME}/bin/java</jvm>
              <testFailureIgnore>true</testFailureIgnore>
            </configuration>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      -->
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.0.4</version>
        <executions>
          <execution>
            <id>attach-source</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <attach>true</attach>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.3</version>
        <executions>
          <execution>
            <id>add-license</id>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <taskdef resource="net/sf/antcontrib/antlib.xml" />
                <if>
                  <or>
                    <equals arg2="jar" arg1="${project.packaging}" />
                    <equals arg2="bundle" arg1="${project.packaging}" />
                  </or>
                  <then>
                    <move file="${project.build.directory}/${project.build.finalName}.jar" tofile="${project.build.directory}/${project.build.finalName}.orig.jar" />
                    <zip destfile="${project.build.directory}/${project.build.finalName}.jar">
                      <zipfileset dir="${basedir}" prefix="META-INF/">
                        <include name="LICENSE.*" />
                        <include name="NOTICE.*" />
                        <include name="COPYRIGHT.*" />
                      </zipfileset>
                      <zipfileset dir="${basedir}/license" prefix="META-INF/license/">
                        <exclude name="**/.*/**" />
                        <include name="**" />
                      </zipfileset>
                      <zipfileset filemode="644" src="${project.build.directory}/${project.build.finalName}.orig.jar" dirmode="755">
                        <exclude name="*/*/*/example/**" />
                      </zipfileset>
                    </zip>
                    <delete file="${project.build.directory}/${project.build.finalName}.orig.jar" />
                    <move file="${project.build.directory}/${project.build.finalName}-sources.jar" tofile="${project.build.directory}/${project.build.finalName}-sources.orig.jar" />
                    <zip destfile="${project.build.directory}/${project.build.finalName}-sources.jar">
                      <zipfileset dir="${basedir}" prefix="META-INF/">
                        <include name="LICENSE.*" />
                        <include name="NOTICE.*" />
                        <include name="COPYRIGHT.*" />
                      </zipfileset>
                      <zipfileset dir="${basedir}/license" prefix="META-INF/license/">
                        <exclude name="**/.*/**" />
                        <include name="**" />
                      </zipfileset>
                      <zipfileset filemode="644" src="${project.build.directory}/${project.build.finalName}-sources.orig.jar" dirmode="755">
                        <exclude name="*/*/*/example/**" />
                      </zipfileset>
                    </zip>
                    <delete file="${project.build.directory}/${project.build.finalName}-sources.orig.jar" />
                  </then>
                </if>
              </tasks>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.7.1</version>
          </dependency>
          <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant-launcher</artifactId>
            <version>1.7.1</version>
          </dependency>
          <dependency>
            <groupId>ant-contrib</groupId>
            <artifactId>ant-contrib</artifactId>
            <version>1.0b2</version>
            <exclusions>
              <exclusion>
                <groupId>ant</groupId>
                <artifactId>ant</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <downloadSources>true</downloadSources>
          <addVersionToProjectName>true</addVersionToProjectName>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
        <updatePolicy>never</updatePolicy>
      </snapshots>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>interval:10080</updatePolicy>
      </releases>
      <id>jboss.release</id>
      <name>JBoss releases</name>
      <url>http://repository.jboss.org/maven2</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
        <updatePolicy>never</updatePolicy>
      </snapshots>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>interval:10080</updatePolicy>
      </releases>
      <id>jboss.release</id>
      <name>JBoss releases</name>
      <url>http://repository.jboss.org/maven2</url>
    </pluginRepository>
  </pluginRepositories>

  <distributionManagement>
    <repository>
      <id>repository.jboss.org</id>
      <name>JBoss.org Release Distribution Repository</name>
      <url>file:///home/david/src/java/repos-maven2</url>
    </repository>
    <snapshotRepository>
      <id>snapshots.jboss.org</id>
      <name>JBoss.org Development Snapshot Repository</name>
      <url>dav:https://snapshots.jboss.org/maven2</url>
    </snapshotRepository>
  </distributionManagement>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <inherited>true</inherited>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>2.4</version>
            <configuration>
              <updateReleaseInfo>true</updateReleaseInfo>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
