<?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>
	 
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>  	
	<groupId>org.docx4j</groupId>
	<artifactId>xhtmlrenderer</artifactId>
	<version>3.0.0</version>
	<packaging>jar</packaging>
	
	<name>xhtmlrenderer</name>
	<description>
		Modified flyingsaucer XML/XHTML and CSS 2.1 renderer, to support docx (and eventually pptx) output
	</description>
	<url>http://www.docx4java.org/</url>
	<licenses>
	  <license>
	    <name>Apache 2</name>
	    <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
	    <distribution>repo</distribution>
	    <comments>A business-friendly OSS license</comments>
	  </license>
  	</licenses>
	<!-- <prerequisites /> -->
	<!--
	<scm>
	    <connection>scm:git@github.com:plutext/flyingsaucer.git</connection>
	    <developerConnection>scm:git@github.com:plutext/flyingsaucer.git</developerConnection>
	    <tag>HEAD</tag>
	    <url>git@github.com:plutext/flyingsaucer.git</url>
    </scm>
    -->
	<scm>
	    <developerConnection>scm:git|git@github.com:plutext/flyingsaucer.git</developerConnection>
    </scm>
	<inceptionYear>2011</inceptionYear>
	<developers>
		<developer>
			<id>jharrop</id>
			<name>Jason Harrop</name>
			<email>jason@plutext.org</email>
			<organization>Plutext</organization>
			<roles>
				<role>Developer</role>
			</roles>
			<timezone>+10</timezone>
		</developer>
	</developers>
	<build>
		<sourceDirectory>src/java</sourceDirectory>
		<!--<testSourceDirectory>src/test/java</testSourceDirectory>-->
		<outputDirectory>bin</outputDirectory>
		<testOutputDirectory>bin</testOutputDirectory>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-compiler-plugin</artifactId>
			<version>2.3.2</version>
			<configuration>
				<!-- 
					The objective is to generate a jar which is compatible with Java 1.5, 
					whilst at the same time allowing @Override annotations in the source 
					code on methods which merely implement an interface 
					(Java 6 allows this, but 1.5 gives an error).
					
					When I played around with this, I found that both maven and ant would 
					happily compile to target 1.5 with the pesky @Override annotations 
					present (irrespective of whether source was set to 1.5 or 1.6).
										
					You are not allowed source=1.6, target=1.5; this results in:
					
						Failure executing javac, but could not parse the error
						javac: source release 1.6 requires target release 1.6
						
					So we need source=1.5, target=1.5
					
					The downside is that m2eclipse mirrors this in Eclipse's 
					compiler settings, and Eclipse then complains about the
					@Override annotations :-(
					
					So you must manually change the Eclipse compiler setting back to 1.6.
																				
				 -->
				<source>1.5</source>
				<target>1.5</target>
				
				<verbose>false</verbose>
				<!--
					maxmemory>512m</maxmemory On Linux, use: MAVEN_OPTS="-Xmx512m" mvn install -->
				<!--
					try to help maven to find package
					com.sun.xml.internal.bind.marshaller:
					<bootclasspath>${java.home}/lib/rt.jar</bootclasspath> but this
					doesn't help
				-->
			</configuration>
		</plugin>
		<!--
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-dependency-plugin</artifactId>
			</plugin>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-surefire-plugin</artifactId>
			<version>2.6</version>
			<configuration>
				<excludes>
					<exclude>**/samples/*.java</exclude>
				</excludes>
			</configuration>
		</plugin>
		-->
		<plugin>
			<artifactId>maven-source-plugin</artifactId>
			<version>2.1.2</version>			
			<executions>
				<execution>
					<goals>
						<goal>jar</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
		<!--  maven-javadoc-plugin seems to require large -Xmx  
			  so comment this out if your  build is failing
			  because you don't have enough.
		-->
		<plugin>
			<artifactId>maven-javadoc-plugin</artifactId>
			<version>2.8</version>
			<configuration>
			</configuration>
			<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>
	-->
	<resources>
		<!--  we want resources/schema/xhtml/catalog-xhtml-1.0.xml etc -->
		<resource>
			<directory>src/catalog</directory>
			<includes>
				<include>**/*.xml</include>
			</includes>
		</resource>
	</resources>
	</build>	
	<reporting>
		<plugins>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.8</version>
				<reportSets>
					<reportSet>
						<id>standard-javadoc</id>
						<inherited>true</inherited>
						<configuration>
							<description>
								 flyingsaucer XHTML/CSS renderer (modified for docx4j)
							</description>
							<docfilessubdirs>true</docfilessubdirs>
							<failOnError>false</failOnError>
							<locale>en_AU</locale>
							<name>Javadoc report</name>
							<quiet>true</quiet>
							<serialwarn>false</serialwarn>
							<show>private</show>
							<source>1.6</source>
							<stylesheet>maven</stylesheet>
							<version>true</version>
						</configuration>
						<reports>
							<report>javadoc</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
		</plugins>
	</reporting>
	<dependencies>
		
 		<dependency>
			<groupId>com.lowagie</groupId>
			<artifactId>itext</artifactId>
			<version>2.1.7</version>			
			<exclusions>
				<exclusion>
					<artifactId>bcprov-jdk14</artifactId>
					<groupId>bouncycastle</groupId>
				</exclusion>
				<exclusion>
					<artifactId>bcmail-jdk14</artifactId>
					<groupId>bouncycastle</groupId>
				</exclusion>
				<exclusion>
					<artifactId>bctsp-jdk14</artifactId>
					<groupId>org.bouncycastle</groupId>
				</exclusion>
			</exclusions>
			
		</dependency>
		
	</dependencies>

	<profiles> <!--  use -P eg mvn -Psign-artifacts  -->
		<profile>
			<id>sign-artifacts</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.4</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>	
</project>
