The PingFederate Java SDK comes with an Apache Ant build script that makes building and deploying your project simple.
Edit the build.local.properties file and set the
target-plugin.name 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 target-plugin.name property as needed to build and deploy other projects.
If your project depends on any third-party jars, place them into your project's
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
On the command line in the sdk directory, use
ant to clean, build, and package or to build, package,
and deploy your project.
To clean the project, enter:
To compile the project, enter:
To compile the project and create a JAR, enter:
The SDK creates deployment descriptor(s) in the PF_INF directory and places it in a JAR. The descriptor tells PingFederate what plugin implementations are contained in the JAR.
The compiled class files and the deployment descriptor(s) 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, create a JAR, and deploy the project to PingFederate, enter:
This build target performs the steps described above and deploying any JAR files found in the lib directory of your subproject.Note:
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.
- Restart the PingFederate server.