blob: c5d45954319f3632eced212e5a3b598caf623765 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- KNOWN ISSUES:
"Production" tgz/zip files need to be copied to ant-like build/
xalan-test integration
Footnote: To get dependency tree from a multi-module project, use the
command "mvn compile dependency:tree" so everything is in scope.
-->
<packaging>pom</packaging>
<modelVersion>4.0.0</modelVersion>
<groupId>xalan</groupId>
<artifactId>xalan-j</artifactId>
<version>2.7.3</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<stylebook.classpath>
"stylebook/stylebook-1.0-b3_xalan-2.jar${path.separator}serializer/target/classes${path.separator}xalan/target/classes${path.separator}"
</stylebook.classpath>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<exec-maven-plugin.version>3.1.0</exec-maven-plugin.version>
<maven-shade-plugin.version>3.5.1</maven-shade-plugin.version>
<junit-jupiter.version>5.10.1</junit-jupiter.version>
<!-- TODO: Upgrade to 5.x after dropping requirement to build on JDK 8 -->
<mockito.version>4.11.0</mockito.version>
<maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
</properties>
<modules>
<module>serializer</module>
<module>xalan</module>
<module>xalansamples</module>
<module>xalanservlet</module>
<module>xsltcapplet</module>
<module>xsltcbrazil</module>
<module>xsltcejb</module>
<module>xsltcservlet</module>
<!-- The binary mode of maven-assembly-plugin needs to run after all the
other modules have created their artifacts. Standard solution to
achieve this sequencing is to make it a separate module which
depends on all the others. See
https://maven.apache.org/plugins/maven-assembly-plugin/faq.html#module-binaries
-->
<module>distribution</module>
</modules>
<profiles>
<profile>
<id>jdk8</id>
<activation>
<jdk>[,9)</jdk>
</activation>
<properties>
<xalan.taglet.artifactId>xalan2jtaglet</xalan.taglet.artifactId>
</properties>
<modules>
<module>xalan2jtaglet</module>
</modules>
</profile>
<profile>
<id>jdk9+</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<xalan.taglet.artifactId>xalan2jtaglet_jdk9</xalan.taglet.artifactId>
<!--
JDK 21 starts warning about dynamic agent attachment by Mockito, if
not present, but the option is also accepted by JDK 9+.
-->
<maven-surefire-plugin.argLine>-XX:+EnableDynamicAgentLoading</maven-surefire-plugin.argLine>
</properties>
<modules>
<module>xalan2jtaglet_jdk9</module>
</modules>
</profile>
<profile>
<id>create-docs</id>
<activation>
<!--
Activate by default. Workaround for 'activeByDefault', which is broken
by design, see https://issues.apache.org/jira/browse/MNG-4917.
-->
<jdk>[1,)</jdk>
</activation>
<build>
<plugins>
<!-- StyleBook processing.
NOTE: Stylebook as it has been calls System.exit() on its way out.
That means running exec:java will malfunction since it'll blow out
the entire Maven process. Workaround is to invoke Stylebook from
the command line with exec:exec. Proper fix is to remove that
behavior from Stylebook's code and have it exit more cleanly,
or to have exec optionally fork a process for java.
The latter is in development.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
<inherited>false</inherited> <!-- Run only in xalan-j parent -->
<executions>
<execution>
<id>Xalan2 design documentation</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<commandlineArgs>-cp ${stylebook.classpath} org.apache.stylebook.StyleBook
loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/design/
./stylebook/sources/xalandesign.xml ./stylebook/style</commandlineArgs>
</configuration>
</execution>
<execution>
<id>Xalan2 compiled (xsltc) documentation</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<commandlineArgs>-cp ${stylebook.classpath} org.apache.stylebook.StyleBook
loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/xsltc/
./stylebook/sources/xsltc.xml ./stylebook/style</commandlineArgs>
</configuration>
</execution>
<execution>
<id>Xalan2 interpretive documentation</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<commandlineArgs>-cp ${stylebook.classpath} org.apache.stylebook.StyleBook
loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/xalan
./stylebook/sources/xalan-jsite.xml ./stylebook/style</commandlineArgs>
</configuration>
</execution>
<!-- Diff tells me that the -jlocal output is almost
identical to the -jsite output despite the slight
difference in the .xml files used as their
sources. (The only effective difference appears to be
that -jlocal doesn't produce the index or charter
documents.) I'm not convinced that's enough difference
to merit generating both, but until I better grok why
this duplication was done in the first place I'm
hesitant to remove it. (jkesselm, 20231105) -->
<execution>
<id>Xalan2 interpretive documentation, local</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<commandlineArgs>-cp ${stylebook.classpath} org.apache.stylebook.StyleBook
loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/xalan/local
./stylebook/sources/xalan-jlocal.xml ./stylebook/style</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>integration-tests</id>
<activation>
<!--
Activate by default. Workaround for 'activeByDefault', which is broken
by design, see https://issues.apache.org/jira/browse/MNG-4917.
-->
<jdk>[1,)</jdk>
</activation>
<modules>
<module>integration-tests</module>
</modules>
</profile>
</profiles>
<build>
<pluginManagement>
<!-- Standardized configuration for plugins used by child modules,
though not invoked by parent module -->
<plugins>
<!-- Copy produced jarfile up to xalan-java/build/,
renaming to remove the version number, for
backward compatibility with things built for the
Ant builds.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>copy-artifact</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<!-- Copy built artifact to ../build -->
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
</artifactItem>
<artifactItem>
<!-- Also copy without the "-${project.version}" suffix
(but with the filetype), for backward compatibility
with Ant build's behavior
-->
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
<!-- stripVersion does not seem to do what's needed, so: -->
<destFileName>${project.artifactId}.${project.packaging}</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${rootlocation}/build</outputDirectory>
</configuration>
</execution>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${rootlocation}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<!-- Our own artifacts are in 'build' already -->
<excludeGroupIds>xalan</excludeGroupIds>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- Unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<argLine>${maven-surefire-plugin.argLine}</argLine>
</configuration>
</plugin>
<!-- Integration tests using our own packaged JARs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.6.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>root-location</id>
<goals>
<goal>rootlocation</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<!-- Deactivate doclint checks in order to suppress errors -->
<doclint>none</doclint>
<!-- Generate class use xref, making javadocs considerably bigger,
but also more informative. Just navigate to any documented
class or package and click on the "Use" link between "Class"
and "Tree". -->
<use>true</use>
<!-- FIXME: Why does it fail without this parameter? -->
<javadocVersion>8</javadocVersion>
<source>1.8</source>
<!-- Custom taglet. Make sure to make each module using this plugin
depend on xalan:${xalan.taglet.artifactId} with scope
'provided', because the dependency is only used during build
time. -->
<taglets>
<taglet>
<tagletClass>xalan2jtaglet.XSLUsageTag</tagletClass>
</taglet>
</taglets>
<tagletArtifact>
<groupId>xalan</groupId>
<artifactId>${xalan.taglet.artifactId}</artifactId>
<version>${project.version}</version>
</tagletArtifact>
<!-- Group package names by topic. Empty groups will not be
rendered, i.e. it does not hurt to specify all groups in the
global configuration. -->
<groups>
<group>
<title>XPath</title>
<packages>org.apache.xpath*</packages>
</group>
<group>
<title>Document Table Model (DTM)</title>
<packages>org.apache.xml.dtm*</packages>
</group>
<group>
<title>Utilities</title>
<packages>org.apache.xml.utils*</packages>
</group>
<group>
<title>Xalan Other</title>
<packages>org.apache.xalan.client:org:org.apache.xalan.extensions:org.apache.xalan.res:org.apache.xalan.stree:org.apache.xalan.trace:org.apache.xalan.xslt</packages>
</group>
<group>
<title>Xalan Extensions</title>
<packages>org.apache.xalan.lib*</packages>
</group>
<group>
<title>Serializers</title>
<packages>org.apache.xml.serialize*:org.apache.xalan.serialize</packages>
</group>
<group>
<title>SAX 2</title>
<packages>org.xml.sax*</packages>
</group>
<group>
<title>DOM 2</title>
<packages>org.w3c.dom*</packages>
</group>
<group>
<title>XSLTC Core</title>
<packages>org.apache.xalan.xsltc*</packages>
</group>
<group>
<title>Samples</title>
<packages>samples*</packages>
</group>
</groups>
</configuration>
<executions>
<execution>
<id>javadoc-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>source-jar</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<directory>META-INF</directory>
<includes>
<include>LICENSE.txt</include>
<include>NOTICE.txt</include>
</includes>
</resource>
<resource>
<directory>resources</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<!-- Maven finds this without assistance, but grumbles about
unspecified plugin version, so... -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.4.5</version>
</plugin>
<!-- During cleaning phase, empty directories ./build and ./lib, which
are normally not present except in the parent module.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<filesets>
<fileset>
<directory>./build</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>./lib</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- Two more files to copy to the site directory -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/site/xsltc</outputDirectory>
<resources>
<resource>
<directory>stylebook/sources/xsltc</directory>
<includes>
<include>README.x*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<!-- Our own modules -->
<dependency>
<groupId>xalan</groupId>
<artifactId>serializer</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalansamples</artifactId>
<version>${project.version}</version>
</dependency>
<!-- For javadoc generation only. Which of the two 'xalan2jtaglet*'
artifacts is used, is determined automatically by Maven profiles
based on the JDK used during the build. The result will be in
property ${xalan.taglet.artifactId}, which is what modules generating
javadocs should depend on with 'provided' scope. -->
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan2jtaglet</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan2jtaglet_jdk9</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- FIXME: Without this exclude, the build only works if module
'xalan2jtaglet' was first installed locally or deployed to
a remote repository. I.e., we have to use something like
'mvn clean install', at least for the taglet module.
'mvn clean package site' on top level is not enough for a
build when the local Maven repo is clean.
-->
<excludePackageNames>xalan2jtaglet</excludePackageNames>
</configuration>
<reportSets>
<reportSet>
<id>aggregate</id>
<inherited>false</inherited>
<reports>
<report>aggregate</report>
</reports>
</reportSet>
<reportSet>
<id>default</id>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</project>