GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • FOP Home
  • Download
  • Quick Start Guide
  • Compliance
  • Getting Help
  • FAQs
  • FOP Wiki
  • Mailing Lists
  • License
  • XSL-FO
  • Examples
  • Bugs & Issues
  • FOP Wiki
  • Other Resources

This view

  • Original page
  • New address

GeezerVison is showing xmlgraphics.apache.org — Apache FOP™: Building from Source Code

 

Apache XML Graphics Project Logo

Apache FOP™¶

  • FOP Home
  • Download
  • Quick Start Guide
  • Compliance
  • Getting Help
  • FAQs
  • FOP Wiki
  • Mailing Lists
  • License
  • Resources¶

    • XSL-FO
    • Examples
    • Bugs & Issues
    • FOP Wiki
    • Other Resources
  • Project¶

    • News
    • Who We Are
    • Status
    • Known Issues
    • Changes
  • Versions¶

    • FOP Trunk (Development)¶

      • Overview
      • Upgrading
      • Using Apache FOP™¶

        • Build
        • Configure
        • Run
        • Embed
        • Servlets
        • Ant Task
        • Config Options
      • Features¶

        • Accessibility
        • Complex Scripts
        • Events
        • Extensions
        • Extensions Reference
        • Fonts
        • Graphics
        • Hyphenation
        • Intermediate Format
        • Metadata
        • Output Formats
        • PDF/A
        • PDF/X
        • PDF Signing & Encryption
        • PDF Images Plug-In
        • Whitespace Management
    • FOP 2.12¶

      • FOP 2.12 Overview
      • Release Notes
      • Changes (2.12)
      • Upgrading
      • Using Apache FOP 2.12¶

        • Build
        • Configure
        • Run
        • Embed
        • Servlets
        • Ant Task
        • Config Options
      • Features¶

        • Accessibility
        • Complex Scripts
        • Events
        • Extensions
        • Extensions Reference
        • Fonts
        • Graphics
        • Hyphenation
        • Intermediate Format
        • Metadata
        • Output Formats
        • PDF/A
        • PDF/X
        • PDF Signing & Encryption
        • PDF Images Plug-In
        • Whitespace Management
    • FOP 2.x¶

      • FOP 2.11¶

        • FOP 2.11 Overview
        • Release Notes
        • Changes (2.11)
        • Upgrading
        • Using Apache FOP 2.11¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Signing & Encryption
          • PDF Images Plug-In
          • Whitespace Management
      • FOP 2.10¶

        • FOP 2.10 Overview
        • Release Notes
        • Changes (2.10)
        • Upgrading
        • Using Apache FOP 2.10¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Signing & Encryption
          • PDF Images Plug-In
          • Whitespace Management
      • FOP 2.9¶

        • FOP 2.9 Overview
        • Release Notes
        • Changes (2.9)
        • Upgrading
        • Using Apache FOP 2.9¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Encryption
          • PDF Images Plug-In
          • Whitespace Management
      • FOP 2.8¶

        • FOP 2.8 Overview
        • Release Notes
        • Changes (2.8)
        • Upgrading
        • Using Apache FOP 2.8¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Encryption
          • PDF Images Plug-In
          • Whitespace Management
      • FOP 2.7¶

        • FOP 2.7 Overview
        • Release Notes
        • Changes (2.7)
        • Upgrading
        • Using Apache FOP 2.7¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Encryption
          • PDF Images Plug-In
          • Whitespace Management
      • FOP 2.6¶

        • FOP 2.6 Overview
        • Release Notes
        • Changes (2.6)
        • Known Issues
        • Upgrading
        • Using Apache FOP 2.6¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Encryption
          • PDF Images Plug-In
          • Whitespace Management
      • FOP 2.5¶

        • FOP 2.5 Overview
        • Release Notes
        • Changes (2.5)
        • Known Issues
        • Upgrading
        • Using Apache FOP 2.5¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Encryption
          • PDF Images Plug-In
          • Whitespace Management
      • FOP 2.4¶

        • FOP 2.4 Overview
        • Release Notes
        • Changes (2.4)
        • Known Issues
        • Upgrading
        • Using Apache FOP 2.4¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Encryption
          • PDF Images Plug-In
          • Whitespace Management
      • FOP 2.3¶

        • FOP 2.3 Overview
        • Release Notes
        • Changes (2.3)
        • Known Issues
        • Upgrading
        • Using Apache FOP 2.3¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Encryption
          • PDF Images Plug-In
          • Whitespace Management
      • FOP 2.2¶

        • FOP 2.2 Overview
        • Release Notes
        • Changes (2.2)
        • Known Issues
        • Upgrading
        • Using Apache FOP 2.2¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Encryption
          • PDF Images Plug-In
          • Whitespace Management
      • FOP 2.1¶

        • FOP 2.1 Overview
        • Release Notes
        • Changes (2.1)
        • Known Issues
        • Upgrading
        • Using Apache FOP 2.1¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Encryption
          • PDF Images Plug-In
          • Whitespace Management
      • FOP 2.0¶

        • FOP 2.0 Overview
        • Release Notes
        • Changes (2.0)
        • Known Issues
        • Upgrading
        • Using Apache FOP 2.0¶

          • Build
          • Configure
          • Run
          • Embed
          • Servlets
          • Ant Task
        • Features¶

          • Accessibility
          • Complex Scripts
          • Events
          • Extensions
          • Fonts
          • Graphics
          • Hyphenation
          • Intermediate Format
          • Metadata
          • Output Formats
          • PDF/A
          • PDF/X
          • PDF Encryption
          • PDF Images Plug-In
          • Whitespace Management
    • FOP 1.1¶

      • FOP 1.1 Overview
      • Release Notes
      • Changes (1.1)
      • Known Issues
      • Upgrading
      • Using Apache FOP 1.1¶

        • Build
        • Configure
        • Run
        • Embed
        • Servlets
        • Ant Task
      • Features¶

        • Accessibility
        • Complex Scripts
        • Events
        • Extensions
        • Fonts
        • Graphics
        • Hyphenation
        • Intermediate Format
        • Metadata
        • Output Formats
        • PDF/A
        • PDF/X
        • PDF Encryption
    • FOP 1.0¶

      • FOP 1.0 Overview
      • Release Notes
      • Changes (1.0)
      • Known Issues
      • Upgrading
      • Using Apache FOP 1.0¶

        • Build
        • Configure
        • Run
        • Embed
        • Servlets
        • Ant Task
      • Features¶

        • Output Formats
        • Intermediate Format
        • PDF Encryption
        • PDF/A
        • PDF/X
        • Graphics
        • Fonts
        • Hyphenation
        • Extensions
        • Events
        • Metadata
        • Accessibility
  • FOP Development¶

    • General Information
    • Testing
    • Developer Tools
    • SVG Issues
    • Release Process
    • Coding Conventions
    • FAQ
    • Adding an Extension
    • Managing Documentation
    • RTFLib (jfor)
    • Implementation Overview
    • Unresolved Issues (Wiki)
    • Design¶

      • Design Introduction
      • Input Parsing
      • Images
      • PDF Library
      • Layout Managers
      • FO Tree
      • SVG
      • Area Tree
      • Optimisations
      • User Agent
      • Renderers
      • Extensions
      • Embedding FOP in Other Applications
      • Startup, Environment, Control
      • Properties
      • Layout
      • Page Breaking
  • Apache® XML Graphics¶

    • Project Overview¶

      • Who We Are
      • Legal Stuff
      • Project Charter
      • Mailing Lists
      • Code Repositories
      • ASF Sponsorship Program
      • ASF Thanks
      • Licenses
      • Apache XML Graphics Security
      • ASF Security

    Sub Projects¶

    • Apache Batik
    • Apache XML Graphics Commons

    Search Apache XML Graphics¶

    ApacheCon N. America¶

    ApacheCon North America

    • ApacheCon NA

    Hope to see you there!

    ApacheCon Europe¶

    ApacheCon Europe

    • ApacheCon Europe

    Hope to see you there!

    Apache Software Foundation

    Support the Apache Software Foundation

This document is for an old version of FOP that is no longer supported. Latest version of this page
The Apache FOP Project

The Apache FOP™ Project

Apache FOP™: Building from Source Code

Do You Need To Build?

Apache FOP™ snapshots are either pre-compiled binary or source. If you are using a binary snapshot, it is already built and there is no need to build it again. If you got the source code from a repository snapshot or via Subversion you will need to build FOP. See the Download Instructions for information about where to obtain binary or repository snapshots, and whether a binary or source snapshot is best for your needs.

Set Up Your Environment

JDK

Building FOP requires a minimum Java Development Kit (JDK/SDK) of 1.8 (A Java Runtime Environment is not sufficient).

CLASSPATH

There is generally no need to setup a classpath. All libraries needed to compile FOP are included in the source distribution and are referenced by the build script. You will only need to adjust the classpath if you build FOP in some other way. See the build script build.xml for details.

JAVA_HOME

The build script uses Apache Ant, a popular Java-based build tool, which usually requires that the environment variable JAVA_HOME point to your local JDK root directory. This is true even if you use JDK 1.5 or above, which normally does not need this setting.

Apache Ant

Apache Ant (Version 1.7 or later) must be installed in order to build FOP. Following best practices we don't include Ant with FOP anymore. You can find the instructions to install Ant in the Ant manual on the web.

Run the Build Script

Change to the FOP root directory and build FOP by executing the build script (build.xml) using the "ant" command.

The "ant" command is only available on your system if you've properly installed Apache Ant and added Ant's location to the PATH environment variable.

The file build.xml in the FOP root directory is the blueprint that Ant uses for the build. It contains information for numerous build targets, many of which are building blocks to more useful target, and others which are primarily used by the FOP developers. You may benefit from looking through this file to learn more about the various build targets. To obtain a complete list of useful build targets:

ant -projecthelp

The most useful targets are:

  • package: Generates the JAR files (default). This is the normal build that produces a jar file usable for running FOP.

  • clean: Cleans the build directory. This is useful for making sure that any build errors are cleaned up before starting a new build. It should not ordinarily be needed, but may be helpful if you are having problems with the build process itself.

  • javadocs: Creates the FOP API documentation.

To run the build:

ant [target ...]

For example to do a normal build for the "all" target (which is the default):

ant

OR

ant all

To clean the build directory first:

ant clean all

If you want to shorten the build time you can just call the "package" target which doesn't perform any automated tests during the build.

Troubleshooting

If you have problems building FOP, please try the following:

  • Run the build with the target of "clean", then rerun the build.

  • Delete the build directory completely, then rerun the build.

  • Make sure you do not have a non-FOP version of xerces.jar, xalan.jar, batik.jar, or another dependency product somewhere in your CLASSPATH.

  • If the build still fails, see the Getting Help page for further help.

You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.