blob: 84d570e554017040ba565dbafb2198224541c35d [file]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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>org.apache.tika</groupId>
<artifactId>tika</artifactId>
<version>${revision}</version>
</parent>
<artifactId>tika-docs</artifactId>
<packaging>pom</packaging>
<name>Apache Tika Documentation</name>
<properties>
<!-- Update this when a new stable version is released -->
<tika.stable.version>3.2.3</tika.stable.version>
<antora.version>1.0.0-alpha.5</antora.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<inputExcludes>
<!-- AsciiDoc pages and plain-text data files do not carry ASF headers -->
<inputExclude>modules/**/*.adoc</inputExclude>
<inputExclude>modules/**/*.txt</inputExclude>
<inputExclude>modules/**/*.yml</inputExclude>
<!-- UI assets: CSS, SVG, and Handlebars templates -->
<inputExclude>supplemental-ui/**</inputExclude>
</inputExcludes>
</configuration>
</plugin>
<!-- Ensure mvn clean removes Antora output -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}/target</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- Stamp the current git commit and build date onto a
sibling copy of antora-playbook.yml so the docs home
page shows which commit produced the site. The copy
lives next to the original so Antora's relative-path
resolution (e.g. ./supplemental-ui) still works. The
generated file is gitignored. -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>stamp-antora-playbook</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<exec executable="git" outputproperty="git.commit.short" failonerror="true">
<arg value="rev-parse"/>
<arg value="--short"/>
<arg value="HEAD"/>
</exec>
<tstamp>
<format property="build.date" pattern="yyyy-MM-dd"/>
</tstamp>
<copy file="${project.basedir}/antora-playbook.yml"
tofile="${project.basedir}/antora-playbook-stamped.yml"
overwrite="true"/>
<replaceregexp file="${project.basedir}/antora-playbook-stamped.yml"
match="(tika-stable-version:.*)"
replace="\1${line.separator} git-commit: '${git.commit.short} (${build.date})'"
byline="true"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<!-- Antora plugin for building the documentation site.
Bound to prepare-package so target/site/ exists before
the assembly runs.
nodeInstallDirectory is moved out of target/ so 'mvn
clean' does not nuke the downloaded Node.js. First
build per machine downloads ~100MB once; subsequent
builds reuse it. The plugin's nodeExecutable param
cannot reuse a system Node on distros where npm and
node packages aren't co-located (Debian/Ubuntu), so
caching the plugin-managed install is the practical
alternative. -->
<plugin>
<groupId>org.antora</groupId>
<artifactId>antora-maven-plugin</artifactId>
<version>${antora.version}</version>
<extensions>true</extensions>
<configuration>
<nodeInstallDirectory>${user.home}/.cache/tika-antora</nodeInstallDirectory>
<playbook>antora-playbook-stamped.yml</playbook>
<packages>
<package>@antora/lunr-extension@1.0.0-alpha.8</package>
</packages>
<options>
<!-- Use 'fatal' for development to ignore broken links, 'error' for CI -->
<option>--log-failure-level=fatal</option>
</options>
</configuration>
<executions>
<execution>
<id>build-antora-site</id>
<phase>prepare-package</phase>
<goals>
<goal>antora</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Maven Assembly plugin to package the built site into a
tar.gz for release distribution. Runs after Antora. -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-docs-archive</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/assembly/docs.xml</descriptor>
</descriptors>
<finalName>${project.artifactId}-${project.version}</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>