blob: 693930f74e046d2a584d281137f943cc8deb5a4b [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<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.glassfish.jersey</groupId>
<artifactId>project</artifactId>
<version>2.36-SNAPSHOT</version>
</parent>
<artifactId>jersey-documentation</artifactId>
<packaging>pom</packaging>
<name>jersey-documentation</name>
<profiles>
<profile>
<id>pre-release</id>
<properties>
<javanet.repository.id>releases</javanet.repository.id>
<jersey.docs.version>${jersey.version}</jersey.docs.version>
<jersey.apidocs.version>${jersey.version}</jersey.apidocs.version>
<jersey.src.branch>${jersey.version}</jersey.src.branch>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<configuration>
<target>
<echo message="Preparing char entities" />
<mkdir dir="${src.dir}" />
<copy todir="${src.dir}">
<fileset dir="src/main/docbook" />
</copy>
<replace file="${src.dir}/jersey.ent" token="$apidocs.version" value="${jersey.apidocs.version}" />
<replace file="${src.dir}/jersey.ent" token="$docs.version" value="${jersey.docs.version}" />
<replace file="${src.dir}/jersey.ent" token="$guava-version" value="${guava.version}" />
<replace file="${src.dir}/jersey.ent" token="$jackson-version" value="${jackson.version}" />
<replace file="${src.dir}/jersey.ent" token="$javax-el-impl-version" value="${javax.el.impl.version}" />
<replace file="${src.dir}/jersey.ent" token="$javax-el-version" value="${javax.el.version}" />
<replace file="${src.dir}/jersey.ent" token="$jax-rs-api-jar-version" value="${jaxrs.impl.version}" />
<replace file="${src.dir}/jersey.ent" token="$jax-rs-version" value="${jaxrs.version}" />
<replace file="${src.dir}/jersey.ent" token="$jaxb-api-jar-version" value="${jaxb.api.version}" />
<replace file="${src.dir}/jersey.ent" token="$repository" value="${javanet.repository.id}" />
<replace file="${src.dir}/jersey.ent" token="$src.branch" value="${jersey.src.branch}" />
<replace file="${src.dir}/jersey.ent" token="$version" value="${jersey.version}" />
</target>
</configuration>
<id>process-entities</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
<version>2.0.15</version>
<dependencies>
<dependency>
<groupId>net.sf.docbook</groupId>
<artifactId>docbook-xml</artifactId>
<version>5.0-all</version>
<classifier>resources</classifier>
<type>zip</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<configuration>
<calloutGraphics>false</calloutGraphics>
<!--calloutGraphicsExtension>1</calloutGraphicsExtension-->
<calloutsExtension>true</calloutsExtension>
<highlightDefaultLanguage />
<highlightSource>true</highlightSource>
<htmlStylesheet>/jersey.github.io/documentation.css</htmlStylesheet>
<!--<htmlStylesheet>https://jersey.java.net/documentation.css</htmlStylesheet>-->
<linenumberingExtension>true</linenumberingExtension>
<linenumberingEveryNth>1</linenumberingEveryNth>
<partAutolabel>true</partAutolabel>
<preProcess>
<copy todir="${project.build.directory}/docbook/index/images">
<fileset dir="${src.dir}/images/" />
</copy>
</preProcess>
<sectionAutolabel>true</sectionAutolabel>
<sectionLabelIncludesComponentLabel>true</sectionLabelIncludesComponentLabel>
<sourceDirectory>${src.dir}</sourceDirectory>
<tablecolumnsExtension>true</tablecolumnsExtension>
<useExtensions>true</useExtensions>
<xincludeSupported>true</xincludeSupported>
</configuration>
<executions>
<execution>
<id>Single page HTML and PDF</id>
<goals>
<goal>generate-html</goal>
<goal>generate-pdf</goal>
</goals>
<configuration>
<htmlCustomization>${src.dir}/cust-single.xsl</htmlCustomization>
<includes>user-guide.xml</includes>
<targetDirectory>${project.build.directory}/docbook/index</targetDirectory>
</configuration>
<phase>package</phase>
</execution>
<execution>
<id>Multiple HTML pages</id>
<goals>
<goal>generate-html</goal>
</goals>
<configuration>
<htmlCustomization>${src.dir}/cust-chunked.xsl</htmlCustomization>
<includes>index.xml</includes>
<chunkedOutput>true</chunkedOutput>
<chunkSectionDepth>0</chunkSectionDepth>
<targetDirectory>${project.build.directory}/docbook/index</targetDirectory>
<useIdAsFilename>true</useIdAsFilename>
</configuration>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/docbook.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/docbook/index/user-guide.pdf</file>
<type>pdf</type>
<classifier>user-guide</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <!-- remove the generated src dir-->
<artifactId>maven-clean-plugin</artifactId>
</plugin>
</plugins>
</build>
<properties>
<assembly.directory>${project.build.directory}/assembly</assembly.directory>
<src.dir>${basedir}/target/gen-src</src.dir>
<javanet.repository.id>snapshots</javanet.repository.id>
<jersey.docs.version>snapshot</jersey.docs.version>
<jersey.apidocs.version>snapshot</jersey.apidocs.version>
<jersey.src.branch>master</jersey.src.branch>
<jaxrs.version>${jaxrs.api.spec.version}</jaxrs.version>
<jaxrs.impl.version>${jaxrs.api.impl.version}</jaxrs.impl.version>
</properties>
</project>