These four basic tasks provide familiarity with the IBM Workload Plug-in Development Kit and virtual application patterns:
- Setting up the samples environment in Eclipse.
- Creating a new plug-in project from the command line.
- Building a single plug-in and pattern type with the command line tools.
- Developing a plug-in with the Eclipse Framework.
Setting up the samples environment in Eclipse
Follow these steps to set up an Eclipse development environment for which you will use the samples.
Before you begin: Make sure you are using the following versions:
- Eclipse V3.6.2, 32-bit. The Java Enterprise Edition (JEE) version is recommended.
- JDK 1.6, 32-bit.
- Import the PDK plugin.depends project and the hello sample source projects.
- Create a new workspace and start Eclipse.
- Select File > Import > General > Existing Projects into Workspace.
- Select Select root directory:. Use the Browse button to find and select the iwd-pdk-workspace directory where you downloaded and expanded the pdk-<version>.zip file.
- Select plugin.depends and the four sample projects.
- patterntype.hello
- plugin.com.ibm.sample.hclink
- plugin.com.ibm.sample.hello
- plugin.com.ibm.sample.hellocenter
- plugin.depends
- Build all the plug-ins in the workspace. Navigate to the plugin.depends project and run the build.xml Ant script. To run Ant, right-click the file and choose Run As > Ant Build.
- Build the hello pattern type. Navigate to the patterntype.hello project and run the build.patterntype.xml script.
- Refresh the patterntype.hello project. A new folder named export is displayed. Navigate to the export folder. The hello-2.0.0.2.tgz pattern type file is located here.
Creating a new plug-in project from the command line
Before you begin:
- Change directory (
cd) to the plugin.depends project directory in your workspace. - Set the
ANT_HOMEenvironment variable. You can use Ant in your Eclipse installation at eclipse/plugins/org.apache.ant_1.7*. You can also invoke this Ant script from Eclipse. - Right-click create.plugin.project.xml in the plugin.depends project and choose Run As > Ant Build.
- Click the
Main tab; in the argument section and enter the various
-Dproject.name=jp1values as shown in the following steps.
To create a new plug-in project:
- Create a new template plug-in project. The project.name property is optional and if it is not specified, it will default to the value of the plugin.name.
ant -Dproject.name=tp1 -Dplugin.name=a.b.c.template -f create.plugin.project.xml
- Create a new Java plug-in project as follows:
- Containing no package name: (.java assumed on Java classname)
ant -Dproject.name=jp1 -Dplugin.name=a.b.c.java - Djava.classname=MyPlugin -f create.plugin.project.xml
- Containing a package name:
ant -Dproject.name=jp2 -Dplugin.name=a.b.c.java - Djava.classname=a.b.c.MyPlugin -f create.plugin.project.xml
- Containing no package name: (.java assumed on Java classname)
- Verify that the command was successful. Import the newly created projects into your
workspace. To build the plug-in projects, for example jp1, find build.plugin.xml in
project jp1, right-click it and issue Run As > Ant Build... with
the goal clean, publish selected. The equivalent Ant command is to issue the following command in the project jp1 directory:
ant -f build.plugin.xml clean publish
You should see the a.b.c.java-<version>.tgz plug-in created in the export directory.
Building a single plug-in and pattern type with the command-line tools
Before you begin: This article assumes that you have the following installed:
- The Ant build environment version 1.7.1 or higher.
- A command-line environment like Linux console or Windows CLI.
- A message format tool such as msgfmt (Linux) or msgfmt.exe (Windows). Add the tool folder into the system path to make sure you can start the tool without the full path.
To build a single plug-in and pattern type:
- Go to the workspace that you created in the Setting up the samples environment section.
- Navigate to the root folder of target plug-in project.
- Build a single plug-in using this command:
ant -f build.plugin.xml
The building information displays in the console. - Go to the export folder of the plug-in project. This folder is generated by Step 3. Locate the plug-in package, which is a TGZ file.
- Navigate to the root of the plugin.depends project.
- Build all plug-ins in this workspace using the following command:
ant -f build.xml
This command builds the plug-ins in this workspace one at a time. After the script starts, go to the image/plugins folder of the plugin.depends project to check all of the built plug-in packages. - Navigate to the root of the pattern type project, patterntype.hello, and type the
following command:
ant -f build.patterntype.xml
After the script starts, go to the root of the export folder of the pattterntype.hello project to check the built pattern type package, which is a TGZ file.
Developing a plug-in with the Eclipse framework
To develop a plug-in with Eclipse:
- Go to the workspace that you created in the Setting up the samples environment section.
- Build a single plug-in.
- Select the build.plugin.xml file in the root of this project.
- Right-click and select Run As > Ant Build. The plug-in starts to build.
- After the build process, refresh the project and a new folder named export displays. All of the build artifacts are listed in the export folder. The plug-in package is in the root of export folder.
- Build all plug-ins in the workspace.
- Select the build.xml file in the root of the plugin.depends project.
- Right-click and select Run As > Ant Build. The plug-in builds.
- After the build process, refresh the project. A new folder named image displays in the sub-folder plugins, which contains all of the built plug-in packages.
- Build a single pattern type. Before this step, you must successfully complete Step 2.
- Select the build.patterntype.xml file in the root of the patterntype.hello project.
- Right-click and select Run As > Ant Build. The pattern type builds.
- After the build process, refresh the project. A new folder named export displays where all the build artifacts are listed.
- The pattern type package is in the root of export folder.
These tasks should get you warmed up using the PDK. If you want a tour of the toolkit, the companion article explains how to create and customize virtual application patterns using the toolkit.
Learn
- Learn more about IBM
PureSystems™.
- Find
IBM PureSystems resources on developerWorks.
-
For more on how to perform tasks in the IBM Cloud, visit these resources:
- Up and download files from a Windows instance.
- Install IIS web server on Windows 2008 R2.
- Create an IBM Cloud instance with the Linux command line.
- Create an IBM Cloud instance with the Windows command line.
- Extend your corporate network with the IBM Cloud.
- High availability apps in the IBM Cloud.
- Parameterize cloud images for custom instances on the fly.
- Windows-targeted approaches to IBM Cloud provisioning.
- Deploy products using rapid deployment service.
- Integrate your authentication policy using a proxy.
- Configure the Linux Logical Volume Manager.
- Deploy a complex topology using a deployment utility tool.
- Provision and configure an instance that spans a public and private VLAN.
- Secure IBM Cloud access for Android devices.
- Recover data in IBM SmartCloud Enterprise.
- Secure virtual machine instances in the cloud.
-
In the developerWorks cloud developer resources, discover and share knowledge and experience of application and services developers building their projects for cloud deployment.
-
Find out how to access
IBM SmartCloud Enterprise; developing on IBM SmartCloud Enterprise is a great way
to practice developing for IBM PureSystems.
Get products and technologies
-
See the product images available for IBM SmartCloud Enterprise.
Discuss
-
Join a cloud computing group on developerWorks.
-
Read all the great cloud blogs on developerWorks.
-
Join the developerWorks community, a professional network and unified set of community tools for connecting, sharing, and collaborating.

Ted Kirby develops plug-in support for IBM Workload Deployer Pattern for Web Applications at IBM in the Research Triangle Park, North Carolina. He is an Apache Geronimo committer and was a WebSphere Application Server Community Edition developer. Previously, he was a WebSphere Technical Evangelist for Extreme Transaction Processing and has enhanced and maintained eCommerce websites and developed distributed operating systems, including the system used by the Deep Blue machine.





