<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.dataone</groupId>
    <artifactId>d1_jibx_extensions</artifactId>
    <packaging>jar</packaging>
    <version>2.2.0-SNAPSHOT</version>
    <name>DataONE_JibX_Extensions</name>
    <url>http://dataone.org</url>
    <properties>
        <org.jibx.version>1.2.5</org.jibx.version>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <D1-version>${project.version}</D1-version>
                            <D1-SCM-Revision>${buildNumber}</D1-SCM-Revision>
                            <D1-SCM-Branch>${scmBranch}</D1-SCM-Branch>
                            <D1-Build-TimeStamp>${timestamp}</D1-Build-TimeStamp>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <configuration>
                    <header>src/license-header.txt</header>
                </configuration>
            </plugin>
            

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>ant-generate-test-jibx</id>
                        <phase>generate-test-sources</phase>
                        <configuration>
                            <tasks>
                                <property name="compile_classpath" refid="maven.compile.classpath"/>
                                <property name="runtime_classpath" refid="maven.runtime.classpath"/>
                                <property name="test_classpath" refid="maven.test.classpath"/>
                                <ant antfile="src/test/resources/buildDomain.xml" target="codegen"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>

                </executions>
                <dependencies>
                    <dependency>
                        <groupId>ant</groupId>
                        <artifactId>ant-nodeps</artifactId>
                        <version>1.6.5</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.ant</groupId>
                        <artifactId>ant-apache-oro</artifactId>
                        <version>1.8.4</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <excludeDefaultDirectories>true</excludeDefaultDirectories>
                    <filesets>
                        <fileset>
                            <directory>${project.build.directory}</directory>
                            <excludes>
                                <exclude>**/*.jar</exclude>
                                <exclude>**/.*</exclude>
                                <exclude>**/.svn/*</exclude>
                            </excludes>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jibx</groupId>
                <artifactId>maven-jibx-plugin</artifactId>
                <version>${org.jibx.version}</version>
                <configuration>
                    <schemaBindingDirectory>src/test/java</schemaBindingDirectory>
                    <verbose>false</verbose>
                </configuration>
                <executions>
                    <execution>
                        <id>compile-binding</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>test-bind</goal>
                        </goals>
                        <configuration>
                            <directory>target/generated-test-sources</directory>
                        </configuration>
                    </execution>
                </executions> 
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-test-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>target/generated-test-sources</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9</version>
                <executions>
                    <execution>
                        <id>resource-bundles</id>
                        <phase>package</phase>
                        <goals>
                            <!-- produce source artifact for main project sources -->
                            <goal>resource-bundle</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!-- 			    <additionalparam>-noqualifier org.dataone.*:java.lang.*</additionalparam>  -->
                    <detectOfflineLinks>false</detectOfflineLinks>
                </configuration>
            </plugin>
            
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>buildInfo/buildInfo.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*.*</include>
                </includes>
            </resource>
        </resources>
    </build>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>LICENSE.txt</url>
        </license>
    </licenses>
    <repositories>
        <repository>
            <id>sonatype.org</id>
            <url>https://repository.sonatype.org/content/shadows/centralm1</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Jibx Maven Repository</id>
            <url>http://jibx.sourceforge.net/maven/</url>
        </repository>
        <repository>
            <id>dataone.org</id>
            <url>http://maven.dataone.org/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-bind</artifactId>
            <version>${org.jibx.version}</version>
	    <scope>provided</scope>
            <!-- optional means dependency is not made transitive -->
            <optional>true</optional> 
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-extras</artifactId>
            <version>${org.jibx.version}</version>
	    <scope>provided</scope>
            <!-- optional means dependency is not made transitive -->
            <optional>true</optional> 
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-run</artifactId>
            <version>${org.jibx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-schema</artifactId>
            <version>${org.jibx.version}</version>
	    <scope>provided</scope>
            <!-- optional means dependency is not made transitive -->
            <optional>true</optional> 
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-tools</artifactId>
            <version>${org.jibx.version}</version>
	    <scope>provided</scope>
            <!-- optional means dependency is not made transitive -->
            <optional>true</optional>         
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>maven-jibx-plugin</artifactId>
            <version>${org.jibx.version}</version>
	    <scope>provided</scope>
            <!-- optional means dependency is not made transitive -->
            <optional>true</optional>     
        </dependency>
    </dependencies>
    <scm>
        <url>https://repository.dataone.org/software/cicore</url>
        <connection>scm:svn:https://repository.dataone.org/software/cicore</connection>
        <developerConnection>scm:svn:https://repository.dataone.org/software/cicore</developerConnection>
        <tag>HEAD</tag>
    </scm>
</project>