Plugin Build File

Apache Ant is a readily available tool that can be used to package plugins prior to deployment and distribution. To provide build specific values, the standard is to also include a build.properties file with a simple key-value pair for all build specific tokens.

The following example illustrates how a properties file can be leveraged to enable multiple developers to use the same build process, despite having dissimilar build environments. The actual build.xml file is responsible for creating the build directory, compiling any Java classes, packaging those compiled classes into a .jar archive, and archiving in .zip format the complete plugin.

Copy
 jdk.home.1.7=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk  
    iiq.home=/usr/local/apache-tomcat-8.0.30/webapps/identityiq/  
    pluginName=TodoPlugin  
    version=2.0.0 

Note that complications can arise when the plugin is built using a different version of Java than the version deployed on the application servers hosting IdentityIQ. Parameterize the javac argument in the build.xml file with the most compatible Java version available. To do this, add the property target to the javac directive, and set equal to whatever version is being targeted.

For example:



<javac srcdir="${pluginSrc}" destdir="${pluginClasses}"

includeantruntime="false" target="1.7">