MetaBoss
User Guides
Synopsis
Beginner's Guide
Configuration Guide
Design Studio Guide
Programming Model Guide
Testing Framework Guide
'How To ...' Guides
References
Synopsis
Design Model Reference
Design Model UML Profile
Test Schema Reference
MetaBoss design library
Run-time libraries API
Dev-time libraries API
HatMaker Example
Synopsis
Enterprise Model Description
Enterprise Model Reference
SystemTest Example
WebServices Example
Miscellaneous
About MetaBoss
Quality Assurance
Compatibility Notes
Acknowledgments
Glossary
Change Log
Version 1.4.0001
Built on 15 Dec 2005 22:31:47

Integrating source code generation into the Apache Ant build

In Brief

  • To import all known MetaBoss custom tasks in to the project:
    <!-- This example shows fragment of ant build file with custom task declarations -->
    
    <!-- Import all tasks defined in resource files located inside libraries -->
    <typedef resource="taskdefs.xml"/>
    
    
  • To invoke Ant on the project which uses MetaBoss:
    REM This example shows fragment of the MS-DOS/Windows batch file which invokes Ant
    
    REM Define location of the JDK tool
    SET JAVA_HOME=c:/j2sdk1.4.2_05
    
    REM Define location of the Ant tool
    SET ANT_HOME=c:/JavaLib/apache-ant-1.6.5
    
    REM Define location of the MetaBoss tool
    SET METABOSS_HOME=c:/MetaBoss-1.4
    
    REM Instruct Ant to use MetaBoss Ant customisation library
    set ANT_ARGS=-lib %METABOSS_HOME%/lib/MetaBossAntIntegration.jar
    
    REM Invoke Ant
    call ant
    
    

Additional Notes

Full list of available MetaBoss Ant tasks and samples how to invoke them can be found in Dev-time libraries API references.

The MetaBoss installation contains real Ant build files used to build example applications. Please look at examples/HatMaker/build.xml or examples/AlmaMater/build.xml for further information.