Development tools : Massive build UDTT project : Massive build in non-interactive mode
  
Massive build in non-interactive mode
You can invoke the building APIs in your build process. You need to import btttbpers.jar from<toolkit_root>\plugins\tooling\com.ibm.btt.tools.perspective.0 directory.
Following is an example for building whole project:
ProjectGenerator pg = CodeGeneratorFactory.getProjectGenerator(CodeGeneratorFactory.CHANNEL_DOJO);
pg.setProgressMonitor(monitor); //Optional, do not use in batch build mode.
// The monitor parameter is an Eclipse IProgressMonitor.
GenerationResult[] results = pg.generateProject(prj); // "prj" is the Eclipse IProject to build
reportResult(results); // User-provided method to report build results
Note The build API requires the Eclipse environment to be available for building. So if a UDTT project build is to be executed from a non-interactive build tool such as Ant or Maven, the Eclipse environment needs to be launched in non-UI headlessmode for the UDTT build to work.
Besides the project-level building, UDTT provides Java interfaces to implement the flexible building requirement.
A UDTT build API provides Java interfaces to implement project-specific build tasks and associate them to file types.
com.ibm.btt.tools.build.CodeGenerator: responsible of generating one or more runtime files from a modeling file.
com.ibm.btt.tools.build.ProjectGenerator: responsible of generating a full project for a given channel.
Code generator factory
com.ibm.btt.tools.build.CodeGeneratorFactory: provides an API to retrieve configured project and code generators for a given channel and model file type
The com.ibm.btt.tools.perspective.generators extension point
Used to register project and code generators.
Default Dojo channel project generator provided as extension.
Default Dojo channel generator for NLS, XUI, Flow, Operation and Global UDTT model files provided as extension.
A popup menu extension provided with Build BTT Project action
Implemented by com.ibm.btt.tools.build.impl.BuildAction
Following is the package/class list and relationship:
 
Package com.ibm.btt.tools.build
Defines the public API and interfaces of the functionality
AbstractGenerator
Base implementation of CodeGenerator interface, providing common code, reused by all other concrete implementations
CodeGenerator
Public interface, implemented by configured code generators, to be implemented by alpha developers intending to provide their own build generators
CodeGeneratorFactory
Provides an API to retrieve configured project and code generators from the plugin extensions, for a given channel and model file type
GenerationResult
Encapsulates all information about the result of the runtime generation for a given model file.
GeneratorException
Exception thrown if problems are found during generation.
GeneratorPriority
Simple enumeration type to provide the 3 priority levels. Recommendation is to refractor all UDTT configuration priorities into a single place.
ProjectGenerator
Public interface, implemented by configured Dojo channel generator, to be implemented by alpha developers intending to provide their own channel generators.
TransactionGenerator
Implements the CodeGenerator interface to generate XML from *.transaction model files.
UIMessages
NLS helper class.
 
Package com.ibm.btt.tools.build.dojo
Provides dojo-related generator code
DojoProjectGenerator
Implements the ProjectGenerator interface for the Dojo channel.
NlsGenerator
Implements the CodeGenerator interface to generate *.js from *.properties files in the configured NLS folder.
XuiGenerator
Implements the CodeGenerator interface to generate *.js and *.jsp from *.xui files in the configured XUI folder.
See also
Massive build UDTT project