<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.x2jb</groupId>
  <artifactId>x2jb-parent</artifactId>
  <packaging>pom</packaging>
  <version>2.0</version>
  <name>X2JB Parent</name>
  <url>http://sourceforge.net/projects/x2jb</url>

  <scm>
    <connection>scm:svn:https://x2jb.svn.sourceforge.net/svnroot/x2jb/trunk</connection>
    <developerConnection>scm:svn:https://x2jb.svn.sourceforge.net/svnroot/x2jb/trunk</developerConnection>
    <url>http://x2jb.svn.sourceforge.net/viewvc/x2jb/trunk/</url>
  </scm>

  <prerequisites>
    <maven>2.1.0</maven>
  </prerequisites>

  <issueManagement>
    <system>SF.net Tracker</system>
    <url>http://sourceforge.net/tracker/?group_id=183262</url>
  </issueManagement>

  <licenses>
    <license>
      <name>lgpl</name>
      <url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
    </license>
  </licenses>

  <modules>
    <module>modules/core</module>
    <module>modules/handlers</module>
    <module>modules/providers</module>
    <module>modules/testsuite</module>
    <module>modules/site</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
      </dependency>
      <dependency>
        <groupId>org.x2jb</groupId>
        <artifactId>x2jb-core</artifactId>
        <version>2.0</version>
      </dependency>
      <dependency>
        <groupId>org.x2jb</groupId>
        <artifactId>x2jb-default-handlers</artifactId>
        <version>2.0</version>
      </dependency>
      <dependency>
        <groupId>org.x2jb</groupId>
        <artifactId>x2jb-annotation-provider</artifactId>
        <version>2.0</version>
      </dependency>
      <dependency>
        <groupId>org.x2jb</groupId>
        <artifactId>x2jb-properties-provider</artifactId>
        <version>2.0</version>
      </dependency>
      <dependency>
        <groupId>org.x2jb</groupId>
        <artifactId>x2jb-test-handlers</artifactId>
        <version>2.0</version>
      </dependency>
      <dependency>
        <groupId>org.x2jb</groupId>
        <artifactId>x2jb-annotation-test-interfaces</artifactId>
        <version>2.0</version>
      </dependency>
      <dependency>
        <groupId>org.x2jb</groupId>
        <artifactId>x2jb-properties-test-interfaces</artifactId>
        <version>2.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
          <optimize>true</optimize>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <finalName>lib</finalName>
          <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
          <appendAssemblyId>false</appendAssemblyId>
          <descriptors>
            <descriptor>src/main/scripts/assembly-artifacts.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>

    <profile>
      <id>bindist</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
              <finalName>x2jb-${version}-bin-dist</finalName>
              <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
              <appendAssemblyId>false</appendAssemblyId>
              <descriptors>
                <descriptor>src/main/scripts/assembly-bin-dist.xml</descriptor>
              </descriptors>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>srcdist</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
              <finalName>x2jb-${version}-src-dist</finalName>
              <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
              <appendAssemblyId>false</appendAssemblyId>
              <descriptors>
                <descriptor>src/main/scripts/assembly-src-dist.xml</descriptor>
              </descriptors>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
