Hi Nick,
I've modified my local forrest setup to run with JDK 18 - I've attached you the
modified files (main/targets/site.xml and
main/webapp/default-forrest.properties).
Up till now it seems to only have problems with .css (i.e the skin css) - after
commenting out the parallel build, only the profile.css is generated invalid.
Regarding the ant build - I don't intent do any modifications there (and rather
would like to remove it) and it looks the other approach [1] got stuck
somewhere, so if the modifications work for you, I would add a manual task to
the gradle build for fixing the http urls and other forrest left-overs
originally handled in the ant build.
Andi
[1] https://lists.apache.org/thread/yo7j2z87y07rvvghh52qz1rfdkcd1pq0
On 09.06.22 22:01, Nick Burch wrote:
On Thu, 9 Jun 2022, PJ Fanning wrote:
The src/documentation/index.xml that we have for Forrest build seems to try to
add it as a footer but it doesn't get picked up. I don't much about Forrest.
Anyone know how this can be fixed?
I've a few ideas, but currently I can't seem to build POI from a svn checkout
using ant...
Gradle builds the source just fine, but we need Ant to use with Forrest
If I try "ant clean jar" it fails on compile-ooxml with
poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGUserAgent.java:66: error:
cannot access ViewCSS
[javac] String viewBoxStr = el.getAttributeNS(null,
SVGConstants.SVG_VIEW_BOX_ATTRIBUTE);
[javac] ^
[javac] class file for org.w3c.dom.css.ViewCSS not found
If I try with "ant docs" then it fails with
[exec] load-project-props:
[exec]
[exec] BUILD FAILED
[exec] java.lang.NoClassDefFoundError: org/w3c/dom/ls/DocumentLS
[exec] at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[exec] at
java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
Is there a trick to getting POI to build happily with Ant, and Java 11, that
anyone knows?
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
<?xml version="1.0"?>
<!--
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 default="site" basedir="." name="site">
<!-- ===============================================================
Makes the site.
param: name of the skin to use ${project.skin} (now)
param: location to find the content ${content-dir}(now)
param: location to make temporary context-dir ${project.webapp}
param: location to make temporary cocoon-work-dir ${content-dir}
param: debuglevel for logging ${project.debuglevel}
param: location of log-file ${project.logkitfile}
===============================================================
-->
<target name="site" depends="init, -prepare-classpath, check-contentdir, validate"
if="project.content.present"
description="* Generates a static HTML website for this project">
<sequential>
<!-- POI fix -->
<!-- parallel -->
<property name="project.followLinks" value="true"/>
<java classname="org.apache.cocoon.Main"
fork="true"
dir="${forrest.core.webapp}"
maxmemory="${forrest.maxmemory}"
failonerror="false"
resultproperty="buildResult">
<jvmarg line="${forrest.jvmargs}"/>
<!-- POI fix -->
<!--
<jvmarg value="-Djava.endorsed.dirs=${forrest.endorsed.lib-dir}${path.separator}${java.endorsed.dirs}"/>
-->
<jvmarg value="-Dorg.apache.cocoon.core.LazyMode=true"/>
<arg value="--logLevel=${project.debuglevel}"/>
<arg value="--Logger=${project.logger}"/>
<arg value="--logKitconfig=${project.logkitfile}"/>
<arg value="--destDir=${project.site-dir}"/>
<arg value="--xconf=${project.configfile}"/>
<arg value="--brokenLinkFile=${project.brokenlinkfile}"/>
<arg value="--workDir=${project.cocoon-work-dir}"/>
<arg value="--uriFile=${project.urifile}"></arg>
<arg value="--followLinks=${project.followLinks}"></arg>
<arg value="${project.start-uri}"/>
<classpath>
<!-- POI fix -->
<pathelement path="${forrest.endorsed.lib-dir}${path.separator}${java.endorsed.dirs}"/>
<path refid="forrest.cp"/>
</classpath>
<syspropertyset>
<propertyref prefix="forrest."/>
<propertyref prefix="project."/>
<propertyref name="user.home"/>
<propertyref name="global.home"/>
</syspropertyset>
</java>
<sequential>
<echo level="warning">
Copying the various non-generated resources to site.
Warnings will be issued if the optional project resources are not found.
This is often the case, because they are optional and so may not be available.</echo>
<!--
| Copy all non-xdocs content across, as we cannot rely on crawling to
| discover the whole URI space. Note: we are emulating the sitemap here;
| please ensure they keep in synch.
-->
<echo level="warning" message="Copying project resources and images to site ..."/>
<copy toDir="${project.site-dir}"
overwrite="true" failonerror="false">
<fileset dir="${content-dir}/content">
<!-- FIXME: what about raw-content-dir? -->
<exclude name="xdocs/**"/>
<!-- FIXME: should use properties since they can be overridden in forrest.properties -->
</fileset>
<fileset dir="${project.webapp}/resources" includes="images"/>
</copy>
<!-- Copy skin images -->
<echo level="warning" message="Copying main skin images to site ..."/>
<mkdir dir="${project.site-dir}/skin/images"/>
<!-- FIXME: we will only be using either project skins or forrest skins - only copy those necessary (don't forget common) -->
<!-- Copy forrest skin images -->
<!-- Do the common ones first followed by those for the skin. -->
<copy toDir="${project.site-dir}/skin/images" overwrite="true"
failonerror="false">
<fileset dir="${forrest.skins-dir}/common/images">
<exclude name="**/*.xslt"/>
</fileset>
</copy>
<copy toDir="${project.site-dir}/skin/images" overwrite="true"
failonerror="false">
<fileset dir="${forrest.skins-dir}/${project.skin}/images">
<exclude name="**/*.xslt"/>
</fileset>
</copy>
<!-- Copy project skin images -->
<!-- Do the common ones first followed by those for the skin. -->
<echo level="warning" message="Copying project skin images to site ..."/>
<copy toDir="${project.site-dir}/skin/images" overwrite="true"
failonerror="false">
<fileset dir="${project.skins-dir}/common/images"/>
</copy>
<copy toDir="${project.site-dir}/skin/images" overwrite="true"
failonerror="false">
<fileset dir="${project.skins-dir}/${project.skin}/images">
<exclude name="**/*.xslt"/>
</fileset>
</copy>
<!-- Copy all other non-resource files -->
<!-- Do the common ones first followed by those for the skin. -->
<echo level="warning" message="Copying main skin css and js files to site ..."/>
<copy toDir="${project.site-dir}/skin"
overwrite="true"
failonerror="false">
<mapper type="flatten"/>
<fileset dir="${forrest.skins-dir}/common">
<exclude name="images/**"/>
<exclude name="xslt/**"/>
<exclude name="**/*.xslt"/>
<exclude name="skinconf.xsl"/>
</fileset>
</copy>
<copy toDir="${project.site-dir}/skin"
overwrite="true"
failonerror="false">
<mapper type="flatten"/>
<fileset dir="${forrest.skins-dir}/${project.skin}">
<exclude name="images/**"/>
<exclude name="xslt/**"/>
<exclude name="**/*.xslt"/>
<exclude name="skinconf.xsl"/>
</fileset>
</copy>
<!-- Copy all other non-resource files from project skins-->
<!-- Do the common ones first followed by those for the skin. -->
<echo level="warning" message="Copying project skin css and js files to site ..."/>
<copy toDir="${project.site-dir}/skin"
overwrite="true"
failonerror="false">
<mapper type="flatten"/>
<fileset dir="${project.skins-dir}/common">
<exclude name="images/**"/>
<exclude name="xslt/**"/>
<exclude name="**/*.xslt"/>
</fileset>
</copy>
<copy toDir="${project.site-dir}/skin"
overwrite="true"
failonerror="false">
<mapper type="flatten"/>
<fileset dir="${project.skins-dir}/${project.skin}">
<exclude name="images/**"/>
<exclude name="xslt/**"/>
<exclude name="**/*.xslt"/>
</fileset>
</copy>
<echo level="warning">
Finished copying the non-generated resources.
Now Cocoon will generate the rest.
</echo>
<echo level="info">
Static site will be generated at:
${project.site-dir}
Cocoon will report the status of each document:
- in column 1: *=okay X=brokenLink ^=pageSkipped (see FAQ).
</echo>
</sequential>
<!-- /parallel -->
<echo level="info">
Copying broken links file to site root.
</echo>
<copy toFile="${project.site-dir}/broken-links.xml" file="${project.brokenlinkfile}"/>
<!-- FIXME: need better way to determine *.validation.xml are present -->
<available property="project.validation.content.present"
file="${project.site-dir}/index.validation.xml"/>
<if>
<equals arg1="${project.validation.content.present}" arg2="true"/>
<then>
<echo level="info" message="Assembling validation report ..."/>
<!-- FIXME: See Ant - Bug 18897 Add option to suppress xslt warning messages
Available in upcoming Ant-1.8.0
-->
<xslt basedir="${project.site-dir}" destdir="${project.temp-dir}/validation"
extension=".xml"
includes="**/*.validation.xml"
style="${forrest.core.webapp}/resources/stylesheets/validation-insert-filename.xsl"
filenameparameter="filename"
filedirparameter="filedir"
/>
<replaceregexp byline="true">
<regexp pattern="^<\?[^?>]+\?>"/>
<substitution expression=""/>
<fileset dir="${project.temp-dir}/validation" includes="**/*.validation.xml"/>
</replaceregexp>
<concat destfile="${project.temp-dir}/validation/reports.xml" fixlastline="yes">
<header><?xml version="1.0" encoding="UTF-8"?>
<reports></header>
<fileset dir="${project.temp-dir}/validation" includes="**/*.validation.xml"/>
<footer></reports></footer>
</concat>
<xslt in="${project.temp-dir}/validation/reports.xml"
out="${project.temp-dir}/validation-reports.html"
style="${forrest.core.webapp}/resources/stylesheets/validation-reports.xsl"/>
<delete>
<fileset dir="${project.site-dir}" includes="**/*.validation.xml"/>
</delete>
<delete file="${project.site-dir}/linkmap.validation-start.xml"/>
<delete dir="${project.temp-dir}/validation"/>
<echo level="info" message="See validation reports at ${project.temp-dir}/validation-reports.html"/>
</then>
</if>
</sequential>
<if>
<equals arg1="${buildResult}" arg2="1"/>
<then>
<fail if="buildResult">
Error building site.
There appears to be a problem with your site build.
Read the output above:
* Cocoon will report the status of each document:
- in column 1: *=okay X=brokenLink ^=pageSkipped (see FAQ).
* Even if only one link is broken, you will still get "failed".
* Your site would still be generated, but some pages would be broken.
- See ${project.site-dir}/broken-links.xml
</fail>
</then>
</if>
<!-- Fix inconsistent line endings. Workaround for FOR-492
Default "eol" attribute will set line endings appropriate to current OS.
-->
<!-- However, due to Ant bug 39585, fixcrlf/@eol is broken on "Mac OS X" so
add another workaround. 39585 is fixed now in Ant trunk 1.7alpha
-->
<condition property="isUnix">
<os family="unix"/>
</condition>
<if>
<equals arg1="${isUnix}" arg2="true"/>
<then>
<fixcrlf srcdir="${project.site-dir}" eol="unix">
<include name="**/*.html"/>
</fixcrlf>
</then>
<else>
<fixcrlf srcdir="${project.site-dir}">
<include name="**/*.html"/>
<!-- The CSS Includes are a workaround for FOR-925 -->
<include name="**/*.css"/>
</fixcrlf>
</else>
</if>
<echo level="info">
-----------------------------
Static site was successfully generated at:
${project.site-dir}
------------------------------
</echo>
</target>
</project>
# 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.
##############
# Default properties used by forrest.build.xml for building the website
##############
# Prints out a summary of Forrest settings for this project
#forrest.echo=true
# Project name (used to name .war file)
project.name=my-project
# Specifies name of Forrest skin to use
project.skin=pelt
#project.skin=tigris
# Descriptors for plugins and skins
# comma separated list, file:// is supported
# POI Fix - use https
forrest.skins.descriptors=https://forrest.apache.org/skins/skins.xml
forrest.plugins.descriptors=https://forrest.apache.org/plugins/plugins.xml,http://forrest.apache.org/plugins/whiteboard-plugins.xml
##############
# behavioural properties
project.menu-scheme=tab_attributes
#project.menu-scheme=directories
##############
# layout properties
# Properties that must be set to override the default locations
#
# Parent properties must be set. This usually means uncommenting
# project.content-dir if any other property using it is uncommented
project.status=status.xml
project.content-dir=src/documentation
project.raw-content-dir=${project.content-dir}/content
project.conf-dir=${project.content-dir}/conf
project.sitemap-dir=${project.content-dir}
project.sitemap=${project.content-dir}/sitemap.xmap
project.xdocs-dir=${project.content-dir}/content/xdocs
project.resources-dir=${project.content-dir}/resources
project.stylesheets-dir=${project.resources-dir}/stylesheets
project.images-dir=${project.resources-dir}/images
project.schema-dir=${project.resources-dir}/schema
project.grammars-dir=${project.resources-dir}/grammars
project.skins-dir=${project.content-dir}/skins
project.skinconf=${project.content-dir}/skinconf.xml
project.lib-dir=${project.content-dir}/lib
project.classes-dir=${project.content-dir}/classes
project.translations-dir=${project.content-dir}/translations
project.build-dir=${project.home}/build
project.site=site
project.temp-dir=${project.build-dir}/tmp
##############
# Cocoon catalog entity resolver properties
# A local OASIS catalog file to supplement the default Forrest catalog
project.catalog=${project.schema-dir}/catalog.xcat
##############
# validation properties
# This set of properties determine if validation is performed
# Values are inherited unless overridden.
# e.g. if forrest.validate=false then all others are false unless set to true.
#forrest.validate=true
#forrest.validate.xdocs=${forrest.validate}
#forrest.validate.skinconf=${forrest.validate}
#forrest.validate.sitemap=${forrest.validate}
#forrest.validate.stylesheets=${forrest.validate}
#forrest.validate.skins=${forrest.validate}
#forrest.validate.skins.stylesheets=${forrest.validate.skins}
# Key:
# *.failonerror=(true|false) - stop when an XML file is invalid
# *.includes=(pattern) - comma-separated list of path patterns to validate
# *.excludes=(pattern) - comma-separated list of path patterns to not validate
#forrest.validate.failonerror=true
#forrest.validate.includes=**/*
#forrest.validate.excludes=
#
#forrest.validate.xdocs.failonerror=${forrest.validate.failonerror}
#
#forrest.validate.xdocs.includes=**/*.x*
#forrest.validate.xdocs.excludes=site.xml
#
#forrest.validate.skinconf.includes=${skinconf-file}
#forrest.validate.skinconf.excludes=
#forrest.validate.skinconf.failonerror=${forrest.validate.failonerror}
#
#forrest.validate.sitemap.includes=${sitemap-file}
#forrest.validate.sitemap.excludes=
#forrest.validate.sitemap.failonerror=${forrest.validate.failonerror}
#
#forrest.validate.stylesheets.includes=**/*.xsl
#forrest.validate.stylesheets.excludes=
#forrest.validate.stylesheets.failonerror=${forrest.validate.failonerror}
#
#forrest.validate.skins.includes=**/*
#forrest.validate.skins.excludes=**/*.xsl
#forrest.validate.skins.failonerror=${forrest.validate.failonerror}
#
#forrest.validate.skins.stylesheets.includes=**/*.xsl
#forrest.validate.skins.stylesheets.excludes=
#forrest.validate.skins.stylesheets.failonerror=${forrest.validate.skins.failonerror}
##############
# General Forrest properties
# The URL to start crawling from
project.start-uri=linkmap.html
# Set logging level for messages printed to the console
# (DEBUG, INFO, WARN, ERROR, FATAL_ERROR)
project.debuglevel=ERROR
# Max memory to allocate to Java
forrest.maxmemory=64m
# Any other arguments to pass to the JVM. For example, to run on an X-less
# server, set to -Djava.awt.headless=true
forrest.jvmargs=
# The bugtracking URL - the issue number will be appended
#project.bugtracking-url=http://issues.apache.org/bugzilla/show_bug.cgi?id=
project.bugtracking-url=http://issues.apache.org/jira/browse/
# The issues list as rss
#project.issues-rss-url=
project.i18n=false
# The names of plugins that are required to build the project
# comma separated list (no spaces)
# Run "forrest available-plugins" for a list of plug-ins currently available
project.required.plugins=org.apache.forrest.plugin.output.pdf
# The names of src directories where project should find required plugins src
# comma separated list (no spaces)
project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/whiteboard/plugins
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]