<?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/xsd/maven-4.0.0.xsd">

	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>com.github.alotuser</groupId>
		<artifactId>openhtmltopdf-parent</artifactId>
		<version>1.0.1</version>
	</parent>

	<artifactId>openhtmltopdf-java2d</artifactId>

	<packaging>jar</packaging>

	<name>Openhtmltopdf Image Rendering (Java2D)</name>
	<description>Openhtmltopdf is a CSS 2.1 renderer written in Java. This
		artifact supports image output with the Java2D API.</description>

	<licenses>
		<license>
			<name>GNU Lesser General Public License (LGPL), version 2.1 or later</name>
			<url>http://www.gnu.org/licenses/lgpl.html</url>
		</license>
	</licenses>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<dependencies>
		<dependency>
			<groupId>com.github.alotuser</groupId>
			<artifactId>openhtmltopdf-core</artifactId>
			<version>${project.version}</version>
		</dependency>
	</dependencies>

	<build>
		<resources>

		</resources>

		<plugins>
			<!-- 使用 resources 插件复制多个 LICENSE 文件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.2.0</version>
				<executions>
					<execution>
						<id>copy-license-files</id>
						<phase>process-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>
								${project.build.outputDirectory}/META-INF</outputDirectory>
							<resources>
								<resource>
									<directory>${basedir}/..</directory>
									<includes>
										<include>LICENSE*</include>
									</includes>
									<filtering>false</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestFile>
							${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
					</archive>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<configuration>
					<instructions>
						<Export-Package>*</Export-Package>
					</instructions>
				</configuration>

				<executions>
					<execution>
						<id>bundle-manifest</id>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>

	</build>
</project>
