<?xml version="1.0"?>

<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.dellroad</groupId>
        <artifactId>dellroad-stuff</artifactId>
        <version>2.4.1</version>
    </parent>
    <artifactId>dellroad-stuff-pobj</artifactId>
    <name>DellRoad Stuff Persistent Object Classes</name>
    <packaging>jar</packaging>
    <description>DellRoad Stuff classes related to PersistenceObject, a very simple XML flat-file object database.</description>
    <distributionManagement>
        <site>
            <id>${project.artifactId}-site</id>
            <url>file://${project.basedir}/../site/${project.artifactId}/</url>
        </site>
    </distributionManagement>

    <!-- We require the 6.0-SNAPSHOT version of BCEL for JiBX binding to work on Java 8 -->
    <pluginRepositories>
        <pluginRepository>
            <id>apache.snapshots</id>
                <name>Apache Development Snapshot Repository</name>
                <url>https://repository.apache.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>

        <!-- Sibling JARs -->
        <dependency>
            <groupId>${project.parent.groupId}</groupId>
            <artifactId>${project.parent.artifactId}-main</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.parent.groupId}</groupId>
            <artifactId>${project.parent.artifactId}-spring</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.parent.groupId}</groupId>
            <artifactId>${project.parent.artifactId}-vaadin7</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.parent.groupId}</groupId>
            <artifactId>${project.parent.artifactId}-vaadin8</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <!-- For unit tests -->
        <dependency>
            <groupId>${project.parent.groupId}</groupId>
            <artifactId>${project.parent.artifactId}-test</artifactId>
            <version>${project.parent.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-extras</artifactId>
            <version>${jibx.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-run</artifactId>
            <version>${jibx.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Apparently missing Vaadin transitive dependency -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>${servlet-api.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- A few classes depend on Vaadin; set these dependencies to optional. -->
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-server</artifactId>
            <version>${vaadin7.version}</version>
            <optional>true</optional>
        </dependency>

    </dependencies>

    <!-- Do JiBX binding required for unit tests -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.jibx</groupId>
                <artifactId>maven-jibx-plugin</artifactId>
                <version>${jibx.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-bind</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
