<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_common_java</artifactId>
    <packaging>jar</packaging>
    <version>2.2.0</version>
    <name>DataONE_Common_Java</name>
    <url>http://dataone.org</url>
    <description>DataONE Common Code with Service Interface Definitions</description>
    <properties>
        <org.jibx.version>1.2.5</org.jibx.version>
        <d1_jibx_extensions.version>2.2.0</d1_jibx_extensions.version>
        <d1_test_resources.version>2.2.0</d1_test_resources.version>
    </properties>
    <build>
        <directory>target</directory>
        <sourceDirectory>src/main/java</sourceDirectory>
        <testSourceDirectory>src/test/java</testSourceDirectory>
        <outputDirectory>target/main-target</outputDirectory>
        <testOutputDirectory>target/test-target</testOutputDirectory>
		<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>
        <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>
                <executions>
                	<!-- make a test resources jar -->
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
			  <groupId>org.apache.maven.plugins</groupId>
			  <artifactId>maven-source-plugin</artifactId>
			  <version>2.2.1</version>
			  <executions>
			    <execution>
			      <id>attach-sources</id>
			      <phase>package</phase>
			      <goals>
			        <goal>jar-no-fork</goal>
			      </goals>
			    </execution>
			  </executions>
			</plugin>

            <!-- take out the placeholder -->
<!-- need the placeholder element or else bad things happen when generating the classes it generated a class for the version so Identifier & Identifier1 no, i don't know why -->

<!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>ant-generate-jibx</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <tasks>
                                <property name="compile_classpath" refid="maven.compile.classpath"/>
                                <property name="runtime_classpath" refid="maven.runtime.classpath"/>
                                <ant antfile="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/main/java</schemaBindingDirectory>
                    <verbose>false</verbose>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>bind</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <configuration>
                    <header>src/license-header.txt</header>
                </configuration>
            </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>
        <pluginManagement>
        	<plugins>
        		<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        		<plugin>
        			<groupId>org.eclipse.m2e</groupId>
        			<artifactId>lifecycle-mapping</artifactId>
        			<version>1.0.0</version>
        			<configuration>
        				<lifecycleMappingMetadata>
        					<pluginExecutions>
        						<pluginExecution>
        							<pluginExecutionFilter>
        								<groupId>
        									org.apache.maven.plugins
        								</groupId>
        								<artifactId>
        									maven-antrun-plugin
        								</artifactId>
        								<versionRange>
        									[1.3,)
        								</versionRange>
        								<goals>
        									<goal>run</goal>
        								</goals>
        							</pluginExecutionFilter>
        							<action>
        								<execute/>
        							</action>
        						</pluginExecution>
        						<pluginExecution>
        							<pluginExecutionFilter>
        								<groupId>org.jibx</groupId>
        								<artifactId>
        									maven-jibx-plugin
        								</artifactId>
        								<versionRange>
        									[1.2.4,)
        								</versionRange>
        								<goals>
        									<goal>bind</goal>
        								</goals>
        							</pluginExecutionFilter>
        							<action>
        								<execute/>
        							</action>
        						</pluginExecution>
        					</pluginExecutions>
        				</lifecycleMappingMetadata>
        			</configuration>
        		</plugin>
        	</plugins>
        </pluginManagement>
    </build>
    <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>
        <!--  the apache snapshots repo is here only for the BCEL workaround -->
<!--         <repository>
         <id>apache.snapshots</id>
         <url>https://repository.apache.org/content/repositories/snapshots</url>
         <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
         </snapshots>
         <releases>
            <enabled>false</enabled>
         </releases>
      </repository> -->
    </repositories>
    <dependencies>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.1</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-bind</artifactId>
            <version>${org.jibx.version}</version>
	    <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-extras</artifactId>
            <version>${org.jibx.version}</version>
	    <scope>provided</scope>
        </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>
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-tools</artifactId>
            <version>${org.jibx.version}</version>
	    <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>maven-jibx-plugin</artifactId>
            <version>${org.jibx.version}</version>
        </dependency>
<!--         <dependency>
                  <groupId>org.apache.bcel</groupId>
                  <artifactId>bcel</artifactId>
                  <version>6.0-SNAPSHOT</version>
               </dependency> -->
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.1</version>
            <type>maven-plugin</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.3.1</version>
            <type>maven-plugin</type>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <groupId>commons-lang</groupId>
                    <artifactId>commons-lang</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-clean-plugin</artifactId>
            <version>2.4.1</version>
            <type>maven-plugin</type>
            <scope>compile</scope>
        </dependency>
        
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.3.1</version>
        </dependency>

        
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>4.3.3</version>
        </dependency>
        
        
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.0</version>
        </dependency>
        
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.3.2</version>
        </dependency>
        
        <dependency>
            <groupId>commons-configuration</groupId>
            <artifactId>commons-configuration</artifactId>
            <version>1.7</version>
            <!--  later versions changes getList() to return List<Object> instead of List<String>
                  so users will need to us getStringArray instead  (refactor) -->
        </dependency>
        
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
        </dependency>
        
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.2</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
<!--
        <dependency>
            <groupId>qdox</groupId>
            <artifactId>qdox</artifactId>
            <version>1.6.1</version>
        </dependency>
-->
        <dependency>
            <groupId>org.dataone</groupId>
            <artifactId>d1_jibx_extensions</artifactId>
            <version>${d1_jibx_extensions.version}</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.dataone</groupId>
            <artifactId>d1_test_resources</artifactId>
            <version>${d1_test_resources.version}</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
    <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.8.4</version>
            <scope>test</scope>
    </dependency>
    </dependencies>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>LICENSE.txt</url>
        </license>
    </licenses>
    <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>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>
</project>