<?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>

	<!-- The Basics -->
	<groupId>org.odftoolkit</groupId>
	<artifactId>odfdom-java</artifactId>
	<version>0.8.6</version>
	<packaging>jar</packaging>

        <parent>
          <groupId>org.sonatype.oss</groupId>
          <artifactId>oss-parent</artifactId>
          <version>5</version>
        </parent>

	<dependencies>
		<dependency>
			<groupId>xerces</groupId>
			<artifactId>xercesImpl</artifactId>
			<version>2.9.1</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.5</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<!-- Build Settings -->
	<build>
		<defaultGoal>install</defaultGoal>
		<finalName>odfdom</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
					<meminitial>512m</meminitial>
					<maxmem>1024m</maxmem>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.3.1</version>
				<configuration>
					<archive>
						<index>true</index>
						<manifest>
							<mainClass>org.odftoolkit.odfdom.JarManifest</mainClass>
						</manifest>
						<manifestEntries>
							<version>${project.version}</version>
						</manifestEntries>
						<manifestSections>
							<manifestSection>
								<name>ODFDOM</name>
								<manifestEntries>
									<ODFDOM-Name>odfdom</ODFDOM-Name>
									<ODFDOM-Version>${project.version}</ODFDOM-Version>
									<ODFDOM-Website>http://odftoolkit.org</ODFDOM-Website>
									<ODFDOM-Built-By>${user.name}</ODFDOM-Built-By>
									<ODFDOM-Built-Date>${build.timestamp}</ODFDOM-Built-Date>
									<ODFDOM-Supported-Odf-Version>1.2</ODFDOM-Supported-Odf-Version>
								</manifestEntries>
							</manifestSection>
						</manifestSections>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.4.3</version>
			</plugin>
			<plugin>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.0-beta-9</version>
				<configuration>
					<!-- Workaround for http://jira.codehaus.org/browse/MGPG-9 -->
					<mavenExecutorId>forked-path</mavenExecutorId>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<!-- Explizit version required for fix on systemPropertyVariables -->
				<version>2.5</version>
				<configuration>
					<systemPropertyVariables>
						<odfdom.version>${project.version}</odfdom.version>
						<odfdom.timestamp>${build.timestamp}</odfdom.timestamp>
					</systemPropertyVariables>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.1</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1.2</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.7</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<extensions>
			<extension>
				<groupId>org.jvnet.wagon-svn</groupId>
				<artifactId>wagon-svn</artifactId>
				<version>1.9</version>
			</extension>
		</extensions>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<doctitle>ODFDOM</doctitle>
					<minmemory>512m</minmemory>
					<maxmemory>1024m</maxmemory>
					<links>
						<link>http://java.sun.com/javase/6/docs/api/</link>
						<link>http://xerces.apache.org/xerces-j/apiDocs/</link>
					</links>
					<splitindex>true</splitindex>
					<windowtitle>ODFDOM API v${project.version} - http://odftoolkit</windowtitle>
					<taglets>
						<taglet>
							<tagletClass>org.odftoolkit.odfdom.taglet.OdfElementTaglet</tagletClass>
						</taglet>
						<taglet>
							<tagletClass>org.odftoolkit.odfdom.taglet.OdfAttributeTaglet</tagletClass>
						</taglet>
						<taglet>
							<tagletClass>org.odftoolkit.odfdom.taglet.OdfDatatypeTaglet</tagletClass>
						</taglet>
					</taglets>
					<tagletArtifact>
						<groupId>org.odftoolkit</groupId>
						<artifactId>taglets</artifactId>
						<version>0.9-SNAPSHOT</version>
					</tagletArtifact>
				</configuration>
			</plugin>

			<!-- Code Coverage Testing generated by Cobertura -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<instrumentation>
						<excludes>
							<exclude>org/odftoolkit/**/*Test.class</exclude>
						</excludes>
					</instrumentation>
				</configuration>
			</plugin>
			
			<!-- Reporting integration test results -->
			<plugin>
        		<groupId>org.apache.maven.plugins</groupId>
        		<artifactId>maven-failsafe-plugin</artifactId>
        		<version>2.5</version>
        		<reportSets>
          			<reportSet>
            			<id>integration-tests</id>
            			<reports>
              				<report>report-only</report>
            			</reports>
            			<configuration>
              				<outputName>failsafe-report</outputName>
            			</configuration>
        			</reportSet>
        		</reportSets>
      		</plugin>
		</plugins>
	</reporting>


	<!-- More Project Information -->
	<name>ODFDOM</name>
	<description>OpenDocument Format (ODF) library</description>
	<url>http://odftoolkit.org/projects/odfdom/pages/Home</url>
	<inceptionYear>2008</inceptionYear>
	<licenses>
		<license>
			<name>Apache 2</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>
	<organization>
		<name>ODF Toolkit Project</name>
		<url>http://odftoolkit.org/</url>
	</organization>
	<developers>
		<developer>
			<id>svanteschubert</id>
			<name>Svante</name>
			<email>svanteschubert AT odftoolkit.org</email>
			<url>http://odftoolkit.org/people/7-Svante-Schubert</url>
			<organization>Sun Microsystems Inc.</organization>
			<organizationUrl>http://www.sun.com/</organizationUrl>
			<roles>
				<role>ODFDOM working group chair</role>
				<role>architect</role>
				<role>developer</role>
			</roles>
			<timezone>+1</timezone>
			<properties>
				<picUrl>http://asset-1.odftoolkit.org/attachments/images/person/SvanteSchubert-2_small.jpg</picUrl>
			</properties>
		</developer>
		<developer>
			<id>Daisy</id>
			<name>Ying Chun Guo</name>
			<email>Daisy AT odftoolkit.org</email>
			<url>http://odftoolkit.org/people/274-Ying-Chun-Guo</url>
			<organization>IBM</organization>
			<organizationUrl>http://www.ibm.com/</organizationUrl>
			<roles>
				<role>developer</role>
			</roles>
			<timezone>+8</timezone>
			<properties>
				<picUrl>http://asset-2.odftoolkit.org/attachments/images/person/Daisy.jpg</picUrl>
			</properties>
		</developer>
		<developer>
			<id>weihuaWang</id>
			<name>Wei Hua Wang</name>
			<email>weihuaWang AT odftoolkit.org</email>
			<url>http://odftoolkit.org/people/297-weihuaWang</url>
			<organization>IBM</organization>
			<organizationUrl>http://www.ibm.com/</organizationUrl>
			<roles>
				<role>developer</role>
			</roles>
			<timezone>+8</timezone>
		</developer>
		<developer>
			<id>devin</id>
			<name>Han Biao</name>
			<email>devin AT odftoolkit.org</email>
			<url>http://odftoolkit.org/people/748-Devin</url>
			<organization>IBM</organization>
			<organizationUrl>http://www.ibm.com/</organizationUrl>
			<roles>
				<role>developer</role>
			</roles>
			<timezone>+8</timezone>
		</developer>
	</developers>


	<!-- Environment Settings -->
	<issueManagement>
		<system>Bugzilla</system>
		<url>https://odftoolkit.org/bugzilla/enter_bug.cgi?product=odfdom</url>
	</issueManagement>
	<mailingLists>
		<!-- To subscribe one of the mailing lists:
			1) First become a member of the http://odftoolkit.org project
			2) Second subscribe here: http://odftoolkit.org/projects/odfdom/lists -->
		<mailingList>
			<name>Dev List</name>
			<archive>http://odftoolkit.org/projects/odfdom/lists/dev/archive</archive>
		</mailingList>
		<mailingList>
			<name>Users List</name>
			<archive>http://odftoolkit.org/projects/odfdom/lists/users/archive</archive>
		</mailingList>
		<mailingList>
			<name>Issues List</name>
			<archive>http://odftoolkit.org/projects/odfdom/lists/issues/archive</archive>
		</mailingList>
		<mailingList>
			<name>Commits List</name>
			<archive>http://odftoolkit.org/projects/odfdom/lists/commits/archive</archive>
		</mailingList>
	</mailingLists>
	<scm>
		<connection>scm:hg:https://hg.odftoolkit.org/hg/odfdom~developer</connection>
		<developerConnection>scm:hg:https://hg.odftoolkit.org/hg/odfdom~developer</developerConnection>
		<url>http://odftoolkit.org/projects/odfdom/sources/developer/show</url>
	</scm>
	<distributionManagement><!-- where outcome is being delivered -->
		<repository>
			<id>odfdom-releases</id>
			<name>ODFDOM Release</name>
			<url>svn:https://odftoolkit.org/svn/odfdom~maven2/release/</url>
			<uniqueVersion>false</uniqueVersion>
		</repository>
		<snapshotRepository>
			<id>odfdom-snapshots</id>
			<name>ODFDOM Snapshot</name>
			<url>svn:https://odftoolkit.org/svn/odfdom~maven2/snapshot/</url>
			<uniqueVersion>false</uniqueVersion>
		</snapshotRepository>
	</distributionManagement>
	<profiles>
		<profile>
			<id>codegen</id>
			<!--
			<activation>
			  <activeByDefault>true</activeByDefault>
			</activation>
			-->
			<build>
				<defaultGoal>install</defaultGoal>
				<plugins>
					<plugin>
						<groupId>org.odftoolkit</groupId>
						<artifactId>maven-codegen-plugin</artifactId>
						<version>0.8</version>
						<executions>
							<execution>
								<id>dom</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>codegen</goal>
								</goals>
								<!-- DOM LAYER CONFIGURATION -->
								<configuration>
									<sourceRoot>${basedir}/src/main/java</sourceRoot>
									<schemaFile>${basedir}/src/codegen/resources/dom/OpenDocument-schema-v1.2-cd04.rng</schemaFile>
									<configFile>${basedir}/src/codegen/resources/dom/config.xml</configFile>
									<templateFile>${basedir}/src/codegen/resources/dom/javacodetemplate.xml</templateFile>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!--
		<profile>
			<id>codegen-pkg</id>
			<activation>
			  <activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<defaultGoal>install</defaultGoal>
				<plugins>
					<plugin>
						<groupId>org.odftoolkit</groupId>
						<artifactId>maven-codegen-plugin</artifactId>
						<version>0.8-SNAPSHOT</version>
						<executions>
							<execution>
								<id>pkg</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>codegen</goal>
								</goals>
								<configuration>
									<sourceRoot>${basedir}/src/main/java</sourceRoot>
									<schemaFile>${basedir}/src/codegen/resources/pkg/OpenDocument-manifest-schema-v1.2-draft7.rng</schemaFile>
									<configFile>${basedir}/src/codegen/resources/pkg/config.xml</configFile>
									<templateFile>${basedir}/src/codegen/resources/pkg/javacodetemplate.xml</templateFile>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
-->
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>release</name>
					<value/>
				</property>
			</activation>
			<build>
				<plugins>
					<!--
						We want to sign the artifact, the POM, and all attached artifacts
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					-->
<!--
						We want to deploy the artifact to a staging location for perusal
					-->
					<plugin>
						<artifactId>maven-assembly-plugin</artifactId>
						<configuration>
							<descriptorRefs>
								<descriptorRef>jar-with-dependencies</descriptorRef>
							</descriptorRefs>
						</configuration>
						<executions>
							<execution>
								<id>single</id>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<inherited>true</inherited>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
						<configuration>
							<altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>
							<updateReleaseInfo>true</updateReleaseInfo>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<encoding>${project.build.sourceEncoding}</encoding>
							<attach>true</attach>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>integration-test</id>
			<activation>
				<property>
					<name>integration-test</name>
				</property>
			</activation>
			<build>
				<defaultGoal>verify</defaultGoal>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>2.5</version>
						<executions>
							<execution>
								<id>failsafe-it</id>
								<phase>integration-test</phase>
								<goals>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
								<configuration>
									<classesDirectory>${basedir}/target/odfdom.jar</classesDirectory>
									<systemPropertyVariables>
										<testresourcefolder>performance</testresourcefolder>
										<executetimes>1</executetimes>
										<testflag>test</testflag>
									</systemPropertyVariables>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<!-- Explizit version required for fix on systemPropertyVariables -->
						<version>2.5</version>
						<configuration>
							<skip>true</skip>
						</configuration>
					</plugin>
					<plugin>
						<artifactId>maven-compiler-plugin</artifactId>
						<configuration>
							<source>1.5</source>
							<target>1.5</target>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
