Dear Wiki user, You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.
The "HowTo/BuildFOPAlternatively" page has been changed by SimonPepping: http://wiki.apache.org/xmlgraphics-fop/HowTo/BuildFOPAlternatively?action=diff&rev1=1&rev2=2 Comment: Some edits Most efforts to build FOP using libraries in the system set the `CLASSPATH` variable for the invocation of `ant`. Example: {{{ - CLASSPATH=:$JAVA_SHARE/avalon-framework.jar:$JAVA_SHARE/batik-all.jar:... + CLASSPATH=$JAVA_SHARE/avalon-framework.jar:$JAVA_SHARE/batik-all.jar:... export CLASSPATH ant package }}} - This works generally, but the `qdox` library is an exception. When the `qdox` library is inserted in the class path in this way, it causes a `NullPointerException`, and the build fails. When this `NPE` is avoided by patching the relevant piece of code, the resulting jar file will lack many files called `event-model.xml`. The workaround is to copy the system's `qdox` library into FOP's `lib/build` directory. === Patching the build script === - FOP's build script defines its class paths in three path variables at the start of the build script: `libs-build-classpath`, `libs-tools-build-classpath`, `libs-run-classpath`. These paths can be patched to refer to the required libraries in the system. The following is a working example on a Debian system: + Alternatively, FOP can be built on top of libraries in the system by using a patched build script. FOP's build script defines its class paths in three path variables at the start of the build script, viz. `libs-build-classpath`, `libs-tools-build-classpath`, `libs-run-classpath`. These paths can be patched to refer to the required libraries in the system. The following is a working example on a Debian system: {{{ <property name="java-share" value="/usr/share/java"/> @@ -56, +55 @@ <pathelement location="${java-share}/fop.jar"/> </path> }}} + Here may libraries in the `lib/build` directory were commented out, since they are not needed for building the package. - Here may libraries in the `lib/build` directory were commented out, since they are not needed for building the package. + == Without ant == + Without ant you are entirely on your own. You should carefully analyse the build process as described in the ant build script, and reproduce that in your own build system. + + But why would you? = HowTo test the newly built fop.jar file = FOP's layoutengine junit tests can be used to test the newly built `fop.jar` file. The following bash script gives an example: @@ -78, +81 @@ java -Dfop.layoutengine.testset=$FOP_TEST_SET -Dfop.layoutengine.disabled=$FOP_DISABLED -classpath $JAVA_CP $TESTRUNNER $TESTCLASS echo Tested $FOP_JAR, test suite $TESTCLASS }}} - These tests compile and use the test classes in FOP's source directory, and use the newly built `fop.jar` file in the `FOP_JAR` variable and the libraries in the system. Note that these tests only test FOP's layout engine. They do not test FOP's backends, which write the laid-out pages to PDF, !PostScript, etc. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
