<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>au.net.causal.maven.plugins</groupId>
	<artifactId>html2pdf-maven-plugin</artifactId>
	<version>2.0</version>
	<name>Maven HTML to PDF Converter Plugin</name>
	<packaging>maven-plugin</packaging>
	
	<description>Maven plugin to generate PDFs from HTML files</description>
	<url>http://oss.causal.net.au/html2pdf-maven-plugin</url>
	<inceptionYear>2014</inceptionYear>
	
	<parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>
	
	<licenses>
		<license>
    		<name>The Apache Software License, Version 2.0</name>
    		<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    		<distribution>repo</distribution>
  		</license>
  	</licenses>
	
	<scm>
		<connection>scm:hg:https://bitbucket.org/prunge/html2pdf-maven-plugin</connection>
		<developerConnection>scm:hg:https://bitbucket.org/prunge/html2pdf-maven-plugin</developerConnection>
		<url>https://bitbucket.org/prunge/html2pdf-maven-plugin/src</url>		
	  <tag>html2pdf-maven-plugin-2.0</tag>
  </scm>
  	
	<developers>
		<developer>
			<id>prunge</id>
			<name>Peter Runge</name>
			<email>prunge@causal.net.au</email>
			<roles>
				<role>Developer</role>
			</roles>
		</developer>
	</developers>
	
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
		
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>3.1.1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<version>3.2</version>
			<scope>provided</scope>
		</dependency>
		
		<dependency>
			<groupId>org.xhtmlrenderer</groupId>
			<artifactId>flying-saucer-pdf</artifactId>
			<version>9.0.4</version>
		</dependency>
		<dependency>
			<groupId>org.ccil.cowan.tagsoup</groupId>
			<artifactId>tagsoup</artifactId>
			<version>1.2.1</version>
		</dependency>
	</dependencies>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>3.2</version>
			</plugin>
		</plugins>
	</reporting>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>3.2</version>
				<configuration>
					<!-- see http://jira.codehaus.org/browse/MNG-5346 -->
					<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
				</configuration>
				<executions>
					<execution>
						<id>mojo-descriptor</id>
						<goals>
							<goal>descriptor</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
			
			<!-- Check Java 1.6 compliance in case of compiling with later JDK -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>animal-sniffer-maven-plugin</artifactId>
				<version>1.9</version>
				<executions>
					<execution>
						<id>check-java16</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<signature>
								<groupId>org.codehaus.mojo.signature</groupId>
								<artifactId>java16</artifactId>
								<version>1.0</version>
							</signature>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		
		<pluginManagement>
			<plugins>
				<!-- Had problems with certain release plugin versions and Mercurial, so force the version on this one -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.4.1</version>
					<configuration>
						<autoVersionSubmodules>true</autoVersionSubmodules>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	
	<profiles>
		<profile>
			<id>run-its</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-invoker-plugin</artifactId>
						<version>1.8</version>
						<configuration>
							<addTestClassPath>true</addTestClassPath>
							<debug>false</debug>
							<projectsDirectory>src/it</projectsDirectory>
							<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
							<pomIncludes>
								<pomInclude>*/pom.xml</pomInclude>
							</pomIncludes>
							<postBuildHookScript>verify</postBuildHookScript>
							<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
							<settingsFile>src/it/settings.xml</settingsFile>
							<goals>
								<goal>clean</goal>
								<goal>generate-resources</goal>
							</goals>
						</configuration>
						<executions>
							<execution>
								<id>integration-test</id>
								<goals>
									<goal>install</goal>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		
		<profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <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>
                        <configuration>
                            <mavenExecutorId>forked-path</mavenExecutorId>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
	</profiles>
	
</project>