1. Before you start, ensure you have the Java SDK and Apache Ant installed.
  2. To create a new plugin, create a new project directory in the <pf_install>/pingfederate/sdk/plugin-src directory.
  3. In the new project directory, create a subdirectory named java.
    This is where you place the Java source code for your implementation(s).

    Follow standard Java package and directory structure layout.

  4. If your project depends on third-party libraries, create another subdirectory called lib and place the necessary JAR files in it.
  5. The build script builds only one project at a time. Edit the build.local.properties file and set target-plugin-name to specify the name of the directory (under <pf_install>/pingfederate/sdk/plugin-src) that contains your project.
  6. In <pf_install>/pingfederate/sdk run ant to display a list of available build targets:
    [java] Main targets: 
    [java] clean-plugin Clean the plug-in build directory 
    [java] deploy-plugin Deploy the plug-in jar and libs to PingFederate
    [java] jar-plugin    Package the plug-in jar 
    [java] Default target: help
    Run the appropriate target to clean, build, or deploy your plug-in.

    Building the project with the build.xml included in the SDK is recommended because it packages the jars with additional metadata to make it discoverable by PingFederate. For detailed information, see Building and deploying your project.