In your project, create A Directory under /source called /appbuilder
Now create an AppBuilder.xml Configuration File. The defines all the information needed
to build the application, and allows various controll over how and what is built.
appbuilder.xml |
<?xml version="1.0" encoding="US-ASCII"?>
<application-builder>
<application-name>myapp</application-name>
<package-prefix>org.jaffa</package-prefix>
<full-package-names>false</full-package-names>
<output-root>c:/sandbox/MyApp/</output-root>
<output-java>source/java/</output-java>
<output-finders>source/java/resources/tools/patternengine/object_finder_1_0/</output-finders>
<output-viewers>source/java/resources/tools/patternengine/object_viewer_1_0/</output-viewers>
<output-lookups>source/java/resources/tools/patternengine/object_lookup_1_0/</output-lookups>
<output-maintenance>source/java/resources/tools/patternengine/object_maintenance_1_0/</output-maintenance>
<domain-object-path>c:/sandbox/MyApp/source/java/resources/tools/patternengine/domain_creator_1_0/</domain-object-path>
<module>
<name>module</name>
<finders-domain-pattern>org.jaffa.myapp.mymodule.domain.*</finders-domain-pattern>
<viewers-domain-pattern>org.jaffa.myapp.mymodule.domain.*</viewers-domain-pattern>
<maintenance-domain-pattern>org.jaffa.myapp.mymodule.domain.*</maintenance-domain-pattern>
<labels>merge</labels>
</module>
<module>
<name>user</name>
<finders-domain-pattern>org.jaffa.myapp.user.domain.*</finders-domain-pattern>
<viewers-domain-pattern>org.jaffa.myapp.user.domain.*</viewers-domain-pattern>
<maintenance-domain-pattern>org.jaffa.myapp.user.domain.*</maintenance-domain-pattern>
<labels>merge</labels>
</module>
</application-builder>
|
The above configuration is pretty self explanatory.
The first section defines the app name, the package structure, the locations of input and output files
in your sandbox.
The second section defines a 'module' you want building. Here you can specify what domain objects
should be used to build the various component in the module. The labels parameter allows you to
ignore, overwrite or merge the labels from the app builder with any existing label fragments that
already exist for that module.
In this example we create two modules, based on the packages that the domain objects live in.
At this point the tool is using the domain object pattern defintions, not the generated code, so
make sure that your domain patterns are current and match your code.
|