Building and deploying with Ant - PingFederate - 10.2

PingFederate Server

PingFederate Server
PingFederate 10.2

Use the Apache Ant build script to clean, build, package, and deploy projects within the PingFederate Java SDK.

The PingFederate Java SDK comes with an Apache Ant build script that simplifies building and deploying your projects.

  1. Edit the file and set the property to the name of your project subdirectory (see Directory structure).

    You can develop source code for multiple projects simultaneously, but you can build and deploy only one at a time. Change the value of the property as needed to build and deploy other projects.

  2. If your project depends on any third-party .jar files, place them into your project's lib directory.
    If the directory does not exist, create a new directory called lib directly under your project's directory. For example, pingfederate/sdk/plugin-src/<subproject-name>/lib.
  3. On the command line in the sdk directory, use ant to clean, build, and package or to build, package, and deploy your project.
    Clean the project ant clean-plugin
    Compile the project ant compile-plugin
    Compile the project and create a .jar file ant jar-plugin

    The SDK creates a deployment descriptor in the PF_INF directory and places it in a .jar file. The descriptor tells PingFederate what plugin implementations are contained in the file, and the compiled class files and the deployment descriptor are placed in the pingfederate/sdk/plugin-src/<subproject-name>/build/classes directory. The pf.plugins.<subproject-name>.jar file is placed in the pingfederate/sdk/plugin-src/<subproject-name>/build/jar directory.

    To compile the project, create a .jar file, and deploy the project to PingFederate, enter:

    ant deploy-plugin

    This build target performs the steps described above and deploys any .jar files found in the lib directory of your subproject.


    To deploy your plugin manually to an installation of the PingFederate server, copy the .jar file and any third-party.jar files into the /server/default/deploy/ directory of that PingFederate installation.

  4. Restart the PingFederate server.