On 13-2-2018 21:31, Norman Dunbar wrote:
I'm in the process of making some corrections assigned to me on Jira and
I have downloaded and extracted the ALLJARS.ZIP file, as well as the
stuff for the libs directory.
I have a clean install in other words.
I've forked the documentation repository so that I can work on it.
Q1. I assume, perhaps wrongly, that when I'm done I can create a pull
request for the fixes?
Yes, you can. If you're not familiar with git: do your changes on a
branch and create a pull request from that branch. That way you can keep
your master the same as the upstream master (see
https://help.github.com/articles/syncing-a-fork/).
Q2. Also, as we still copying everything into the B_Release branch?
As far as I understand, yes.
I've done a "./build.sh docs" and everything has built ok, except, the
multi-page HTML docs which don't go into dist/html, they just get built
into the root folder. This truly messes up a "git status" command as all
the files are listed.
Q3. Anyone else seen this? With a clean build? Oracle Java 9?
The build doesn't work with Java 9. In any case, it works OK for me with
Java 8, on Windows.
I did clear everything out again, from the root folder, and did a
"./build.sh html" and got exactly the same mess. I can manually move
things into dist, but I can't see anything in the build.xml that might
be causing this - but I'm not an Ant guru I'm afraid.
Q4. Any clues?
Ok, moving on the the main topic, the ANT build fails to work under Java
9. We are using the 2005 version of ANT - version 1.6.5 and this bug
that hit me tonight, was fixed in version 1.9.8 and 1.10.0 back in 2016.
The bug produces the following output:
BUILD FAILED
/data/SourceCode/firebird-documentation/src/build/build.xml:770: The
following error occurred while executing this line:
/data/SourceCode/firebird-documentation/src/build/build.xml:477:
java.lang.NoClassDefFoundError:
jdk/internal/reflect/ConstructorAccessorImpl
The workaround, courtesy of
https://bz.apache.org/bugzilla/show_bug.cgi?id=59556, is to edit the file:
firebird-documentation/src/build/build.xml
To change the following 4 lines:
grep -n "com.icl.saxon.StyleSheet"
/data/SourceCode/firebird-documentation/src/build/build.xml
404: <java classname="com.icl.saxon.StyleSheet"
classpathref="saxon.path" failonerror="true" fork="true">
477: <java classname="com.icl.saxon.StyleSheet"
classpathref="saxon.path" failonerror="true" fork="true">
646: <java classname="com.icl.saxon.StyleSheet"
classpathref="saxon.path" failonerror="true" fork="true">
694: <java classname="com.icl.saxon.StyleSheet"
classpathref="saxon.path" failonerror="true" fork="true">
Each of those lines needs the " fork=true" adding just before the
closing '>' and if the above wraps around, they should be all on one line.
It doesn't all need to be on one line, it just needs to be syntactically
correct XML (and of course, valid Ant elements/attributes/values).
Lines 404, 477, 646 and 694 need amending.
Mine look like the above. Once done and saved, the docs will build again.
Sorry to be such a PITA with the questions, but at least I've solved one
of my problems! ;-)
Looking at the build.xml, the change that enabled this forking is the
cause of the problem. In the html target, immediately after the java
task you modified is the following:
<!-- destdir/out parameters are ignored due to chunking
so we move all chunked html files to their destination: -->
<move todir="${html.dir}">
<fileset dir="${build.dir}" includes="*.html"/>
</move>
I have observed that under Java 8, it writes the files in src/build, and
then after building, it moves them to the dist/html folder.
Given you say you see the files in the root (and I assume you mean the
root of the firebird-documentation repo), it is possible that forking
changed the current working directory (from ./src/build to ./), as the
fork is likely applying the Ant basedir as its working directory.
As the files are now in a different location, the above move fails.
A possible workaround is to add dir="${html.dir}" to the java task in
the html task (when fork="true", this will use that as the current
working directory), I haven't tested it though. However, I'm not sure if
forking may cause other issues, so maybe we should tread carefully here.
In any case, maybe we should look at updating ant (and maybe some of the
other dependencies).
Mark
--
Mark Rotteveel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs