Build and Deploy the Policy

Build using the ant script and deploy policy JAR using the REST API available in APIP Management Tier.

You must run ant scripts to build and deploy from Eclipse. Ant script to build and deploy does not work outside Eclipse. To build and deploy the customized policy:
  1. Navigate to the root folder the holds the policy implementation.
  2. To build policy jars, execute the ant script build.xml from eclipse.
  3. Once the script finishes, you can find the following new file in the root folder
    {prefix to the policy jar}.{policyname}.jar . Prefix to the policy jar is set in the build.properties file in the policy.
  4. Deploy the policy JAR using the REST API available in APIP Management Tier.
    curl -X POST -u {username}:{password} http://{hostname}:{port number}/apiplatform/administration/v1/policies -H "Content-Type:application/octet-stream" --data-binary @{prefix to the policy jar}.{policyname}.jar