<?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>9</version>
  </parent>
	
	<groupId>org.docx4j</groupId>
	<artifactId>docx4j-ImportXHTML</artifactId>
	<name>docx4j-ImportXHTML</name>
	<version>8.3.8</version>
	<description>
		docx4j-ImportXHTML converts XHTML to OpenXML WordML (docx) using docx4j 
	</description>
	<url>http://www.docx4java.org/</url>
	<licenses>
	  <license>
	    <name>LGPL v2.1</name>
	    <url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
	    <distribution>repo</distribution>
	    <comments>The same license as https://github.com/danfickle/openhtmltopdf.  See legals/NOTICE for details.</comments>
	  </license>
  	</licenses>
	<scm>
	    <developerConnection>scm:git|git@github.com:plutext/docx4j-ImportXHTML.git</developerConnection>
      <tag>docx4j-ImportXHTML-8.3.8</tag>
  </scm>
	<inceptionYear>2013</inceptionYear>
	<developers>
		<developer>
			<id>jharrop</id>
			<name>Jason Harrop</name>
			<email>jharrop@plutext.com</email>
			<organization>Plutext</organization>
			<roles>
				<role>Developer</role>
			</roles>
			<timezone>+10</timezone>
		</developer>
	</developers>
	<contributors>
		<contributor>
			<name>Ivan Lozitski (ai-github)</name>
		</contributor>
		<contributor>
			<name>Basil Zabairatsky (bsl-zcs)</name>
		</contributor>
		<contributor>
			<name>Tomas Bezdek</name>
		</contributor>
		<!--  others listed in CHANGELOG.md, to be added here -->
	</contributors>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	  	
	<build>
		<sourceDirectory>src/main/java</sourceDirectory>
		<testSourceDirectory>src/test/java</testSourceDirectory>
		<outputDirectory>bin</outputDirectory> <!--  bin-mvn -->
		<testOutputDirectory>bin-testOutput</testOutputDirectory>
		<plugins>
		
		
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.3</version>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/samples/java</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
			</plugin>

	     <plugin>
	        <groupId>org.apache.maven.plugins</groupId>
	        <artifactId>maven-enforcer-plugin</artifactId>
	        <version>3.0.0-M2</version> 
	        <executions>
	          <execution>
	            <id>enforce-bytecode-version</id>
	            <goals>
	              <goal>enforce</goal>
	            </goals>
	            <configuration>
	              <rules>
	                <enforceBytecodeVersion>
	                  <maxJdkVersion>1.8</maxJdkVersion>
	                  <excludes>
	                    <exclude>org.mindrot:jbcrypt</exclude>
	                  </excludes>
	                </enforceBytecodeVersion>
	              </rules>
	              <fail>true</fail>
	            </configuration>
	          </execution>
	        </executions>
	        <dependencies>
	          <dependency>
	            <groupId>org.codehaus.mojo</groupId>
	            <artifactId>extra-enforcer-rules</artifactId>
	            <version>1.2</version>
	          </dependency>
	        </dependencies>
	      </plugin>			
			 			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<!-- The Surefire Plugin is used during the test phase of the build lifecycle
					to execute the unit tests of an application -->
				<version>2.6</version>
				<configuration>
					<excludes>
						<exclude>**/samples/*.java</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.3.1</version>
				<configuration>
					<excludes>
						<exclude>**/*.docx</exclude>
						<exclude>src/test/resources/**</exclude>
						<exclude>**/log4j.xml</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<!-- The Source Plugin creates a jar archive of the source files of the
					current project. -->
				<version>3.0.1</version>
				<executions>
					<execution>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- Maven Central REQUIRES Javadoc

				 hiccups on org.slf4j since it is a multi-release jar
				 broken in Java 11, fixed in Java 12
				 https://bugs.openjdk.java.net/browse/JDK-8222309
			 -->			 
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.1.0</version> 
				<configuration>
					<maxmemory>512m</maxmemory>
					<additionalJOption>-Xdoclint:none</additionalJOption>
					<!-- workaround for 'javadoc: error - The code being documented uses packages in the unnamed module' issue 
						 still present in Java 14!
						 https://stackoverflow.com/a/63475569/1031689
						 -->
				    <source>8</source>
				    <detectJavaApiLink>false</detectJavaApiLink>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			
 			<!--  mvn versions:display-dependency-updates -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<rulesUri>file:///${project.basedir}/rules.xml</rulesUri>
				</configuration>
			</plugin> 
			
		</plugins>
		
	<pluginManagement>
		<plugins>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<useReleaseProfile>false</useReleaseProfile>
					<arguments>${arguments} -Psonatype-oss-release</arguments>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.1.0</version>
			</plugin>

			<plugin>
				<groupId>org.eclipse.m2e</groupId>
				<artifactId>lifecycle-mapping</artifactId>
				<version>1.0.0</version>
				<configuration>
					<lifecycleMappingMetadata>
						<pluginExecutions>
							<pluginExecution>
								<pluginExecutionFilter>
									<groupId>org.codehaus.mojo</groupId>
									<artifactId>build-helper-maven-plugin</artifactId>
									<versionRange>[1.3,2.0)</versionRange>
									<goals>
										<goal>add-source</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<execute>
										<runOnIncremental>true</runOnIncremental>
									</execute>
								</action>
							</pluginExecution>
							<pluginExecution>
								<pluginExecutionFilter>
									<groupId>org.codehaus.mojo</groupId>
									<artifactId>flatten-maven-plugin</artifactId>
									<versionRange>[1.0.0,)</versionRange>
									<goals>
										<goal>flatten</goal>
										<goal>clean</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<ignore />
								</action>
							</pluginExecution>
						</pluginExecutions>
					</lifecycleMappingMetadata>
				</configuration>
			</plugin>
		</plugins>
	</pluginManagement> 
	   
		<resources>
			<!-- be sure to get xml,xlst resources in various src trees -->
			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**/*.xslt</include>
					<include>**/*.xml</include>
					<include>**/jaxb.properties</include>
				</includes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<includes>
					<include>XhtmlNamespaceHandler.css</include>
					<include>xhtmlrenderer.conf</include>
				</includes>
			
			</resource>
			<!-- <resource> <directory>src/test/resources</directory> <excludes> <exclude>*.docx</exclude>
				</excludes> </resource> -->
		</resources>
	</build>
	
	<dependencies>

		<dependency>
			<groupId>com.openhtmltopdf</groupId>
			<artifactId>openhtmltopdf-core</artifactId>
			<version>1.0.10</version>
		</dependency>
		<dependency>
			<groupId>com.openhtmltopdf</groupId>
			<artifactId>openhtmltopdf-pdfbox</artifactId>
			<version>1.0.10</version>
		</dependency>
 
		<!--  you should use the RI here if you are using eg Java 13, even if compliance is set in your project to 1.8 -->
		<dependency>
		  <groupId>org.docx4j</groupId>
		  <artifactId>docx4j-JAXB-ReferenceImpl</artifactId>
			<version>8.3.8</version>
			<!--  <scope>test</scope>-->
		</dependency>
		
		<dependency>
			<groupId>org.apache.james</groupId>
			<artifactId>apache-mime4j-core</artifactId>
			<version>0.8.7</version>
		</dependency>		
	 	
		<!-- sample docx4j.properties specifies this --> 
		<dependency>
		  <groupId>xerces</groupId>
		  <artifactId>xercesImpl</artifactId>
		  <version>2.12.0</version>
		  <!-- 
		  <exclusions>
		  	<exclusion>
			  <groupId>xml-apis</groupId>
			  <artifactId>xml-apis</artifactId>
		  	</exclusion>
		  </exclusions>
		   -->
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.26</version>
		</dependency>
		
<!-- 		
		<dependency>
		  <groupId>org.slf4j</groupId>
		  <artifactId>slf4j-log4j12</artifactId>
		  <version>1.7.5</version>
		</dependency>		
 -->

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.2.3</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
	 	
	</dependencies>

		<profiles> <!--  use -P eg mvn -Psign-artifacts  -->
		
		    <profile>
		        <id>jdk-8-config</id>
		        <activation>
		            <jdk>1.8</jdk>
		        </activation>
		        <properties>
		            <javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
		        </properties>
		    </profile>
		    <profile>
		        <id>jdk-11-config</id>
		        <activation>
		            <jdk>11</jdk>
		        </activation>
		        <properties>
		            <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
		        </properties>
		    </profile>
		
		
		<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>
