4.3 Building MMIR StarterKit - mmig/mmir GitHub Wiki
Building the MMIR StarerKit
The StarterKit project contains an ANT build.xml
file for automating repetitive build tasks.
Building in context of the MMIR framework mainly means, to keep the directories.json
file up to date – it needs to be updated every time a controller, view, model, or language resource file (e.g. dictionary, grammar) is added or removed. This can be done, using the build.xml
file of the project.
Build Configuration and Additional Requirements
The configuration file for build.xml
is build.settings
: if you do not see the file build.settings
, either
copy build.settingsDefault
and rename it or try to run build.xml once (and refresh the view in Eclipse) which
will create build.settings
if it does not exist yet [Θ].
This file only needs to be configured, if
- you want to create or modify speech grammars
(in
www/config/languages/[lang]/grammar.json
) - you want to compile
dialogDescriptionSCXML.xml
orinputDescriptionSCXML.xml
NOTE: explicitly compiling the SCXML files into JavaScript files is not necessary any more, since the used SCION library interprets the XML files directly – however, compilation can be useful e.g. for finding syntax errors in the SCXML files.
If you do not want to do 1. or 2., no additional configuration is needed.
For compiling speech grammars (1.), we highly recommend the use (and configuration) for NodeJS
[◊] since this is considerably faster than, e.g. using Mozilla Rhino. If you want to use NodeJS, you need to edit build.settings
to set the correct path and executable name to NodeJS (after you have downloaded/installed NodeJS).
NOTE: If you remove a speech grammar, you also should run the clean task in build.xml (or delete the compiled grammar file manually).
For compiling dialogDescriptionSCXML.xml
or inputDescriptionSCXML.xml
(2.) you need the Open Source project Apache SCXML Commons JS and Maven; edit build.settings
and set your paths etc. for Maven and the SCXML Commons JS project.
The MMIR framework knows about all components (e.g. JavaScript implementations, view templates, etc.) that it needs to load by looking into the JSON file
/assets/www/config/directories.json
.You can automatically create an updated version of this file by using the Ant task
generateFileListJSONFile
in/build.xml
(this is the default target in the Ant build file). To run the task, e.g. open the context menu on/build.xml
and select Run As → Ant Build – this also compiles the grammar definitions (grammar.json
) into executable grammars; if you want to only update the file-list run the specific target, e.g. by using Run As → Ant Build... and selecting the targetgenerateFileListJSONFile
.You should update the information in
directories.json
always after creating for deleting file for
- A controller in
www/controllers/
- A helper in
www/helpers/
- A model in
www/models/
- A view or layout in
www/views/
- A plugin in
www/mmirf/plugins/
- A dictionary in
www/config/languages/
- A grammar in
www/config/languages/
- A speech config. in
www/config/languages/
< previous: "Run MMIR StaterKit" > | next: "Expanding Controllers" >
[Θ]
the file build.properties
contains general settings for build.xml
, which do not need to be customized to the specific
project environment; i.e. normally you would not need to modify this file.
[◊] see http://nodejs.org/