Installing and using Mobile Suite : Using webMethods Mobile Designer : Customizing the Build Process : Creating Custom Ant Scripts to Run at Predefined Hook Points
Creating Custom Ant Scripts to Run at Predefined Hook Points
 
Hook Point Reference
To customize the standard build process that Mobile Designer performs, you can create custom Ant scripts that Mobile Designer runs at various predefined points, called hook points. For example, to automatically upload a build to an FTP server once the build is created, you can use the PostBuild Hook Point, which Mobile Designer runs after it completes a build.
Mobile Designer provides several predefined hook points in the build process where you can inject a custom Ant script to perform custom actions. For example, you can have Mobile Designer run a custom Ant script before it runs the resource handler, or you can have Mobile Designer run a custom Ant script after it runs the resource handler. For more information about the hook points you can use and when each occur in the build process, see Hook Point Reference and Ant Target Summary.
To run a custom Ant script at a hook point:
*You must add the associated hook point property to your project’s _defaults_.xml file. You use the property to provide the name of the custom Ant script that you want Mobile Designer to run. For information about the properties, see Hook Point Properties.
*You must create the custom Ant script. You can include the Ant script in your _defaults_.xml file directly after the property declaration.
Ant properties, parameters, and paths set in your custom Ant scripts do not flow through into the remaining build process. Your custom Ant scripts are separate Ant target calls that branch off outside the normal build process flow.
Caution:  
Although invoking custom Ant scripts at the predefined hook points adds flexibility to the build process, be aware that Mobile Designer does not perform safety checking on custom Ant scripts before executing them. You should thoroughly test your custom Ant script's functionality before integrating it into Mobile Designer.
Note:  
Use of hook points is optional. You can use none, one, or multiple hook points. Mobile Designer only attempts to run a custom Ant script at a hook point if your project’s _defaults_.xml file contains a hook point property that provides the name of a custom Ant script.
For an example that illustrates how you use hook points, see the NativeUI PDF Demo sample project.
Copyright © 2007-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback