
<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.ancoron.postgresql</groupId>
        <artifactId>pginet-parent</artifactId>
        <version>9.1.901.jdbc4.1-rc9</version>
    </parent>

    <artifactId>org.ancoron.postgresql.jpa</artifactId>
    <packaging>jar</packaging>

    <name>PostgreSQL Network Types JPA Extension OSGi Bundle</name>
    
    <description>
        This OSGi bundle contains classes that can be used directly within a JPA 2.0 enabled application to support direct mapping of the PostgreSQL specific data types 'inet', 'cidr' and 'macaddr'.
    </description>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>org.postgresql</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>org.postgresql.net</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>javax.persistence</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.osgi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.core</artifactId>
            <version>${eclipselink.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>test-util</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <!--
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.antlr</artifactId>
            <version>${eclipselink.version}</version>
            <scope>test</scope>
        </dependency>
        -->
    </dependencies>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>  
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        <manifestEntries>
                            <Built-By>ancoron</Built-By>
                            <PostgreSQL-Driver>${postgresql.version}</PostgreSQL-Driver>
                        </manifestEntries>
                    </archive> 
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>
                            ${project.artifactId}*
                        </Export-Package>
                        <Import-Package>
                            org.eclipse*;resolution:=optional;version="[\$(version;=;\$(@)),\$(version;+;\$(@)))",
                            org.postgresql*;resolution:=optional;version="[\$(version;=;\$(@)),\$(version;+;\$(@)))",
                            org.ancoron*;resolution:=optional;version="[\$(version;=;\$(@)),\$(version;+;\$(@)))",
                            *
                        </Import-Package>
                    </instructions>
                </configuration>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>    
                            <goal>manifest</goal>
                        </goals>   
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/TestUtil</exclude>
                    </excludes>
                    <properties>
                        <property>
                            <name>listener</name>
                            <value>org.ancoron.postgresql.utils.test.LoggingRunListener</value>
                        </property>
                    </properties>
                    <parallel>methods</parallel>
                    <threadCount>4</threadCount>
                    <systemPropertyVariables>
                        <java.util.logging.config.file>${project.build.testOutputDirectory}/logging.properties</java.util.logging.config.file>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
