These are the file and directories conventions each ModelAnt product and component (module) must obey:
Structure of Directories
All development of MDA Tolls’ products and components is organized in directories:
<root>/
dist/
doc/
docs/
lib/
out/
<product>/
lib/
<component>
<metamodel name>
<metamodel name>-<component>
build.xml
version.properties
version/
work/
xmi/
env.xml
base.build.xml
where:
<root>is the directory where all products of MDA Tools are collected<product>directory holds a single product like ModelAnt.<component>directory holds the source files of a component of the owner product. These components are common, independent of any meta-model. Examples: core, repository, template.<metamodel name>directory holds the meta-model definition files and specific macro definitions. It forms a separate “meta-model component” simplifying the usage of the meta-model. Examples: uml13, uml14.<metamodel name>-<component>directory holds the source files of a component of the owner product. These components are specific for that meta-model. Examples: uml13-wrap, uml13-reverse.<product>/libdirectory holds the product-specific library files.<product>/build.xmlfile implements the targets needed to build all components as a single product. These are:build.alltarget which calls the build targets of the build.xml files of each component to include in the productdoc.javatarget which lists the Java packages of the product’s components, to be included in product documentation as javaDoc. It effectively generates that documentation.doc.anttarget generates the ant.doc documentation of Ant tasks, types, macros and scripts the product’s components publish.
This file includes the
base.build.xmlfile, so building the product’s distribution is done by callingdist.alltarget. For more details see script’s help target (the default one).version.propertiesfile states the current product’s version and states the major changes the each version introducesdistdirectory is where the distributions of the products are generated. It represents the distribution(s) in an expanded, ready for use form.docdirectory and documentationdocsdirectory holds a copy of the javaDoc and ant.doc documentation generated during the last distribution buildlibdirectory holds the library .jar files that are common for all productsoutdirectory holds any output / artifacts the ModelAnt scripts generateversiondirectory collects the zipped distribution files, i.e. for each product version these are three separate files holding the binary product distribution, the source code of the product distribution and the documentation of the distribution in the form of javaDoc and ant.doc tools output.workdirectory holds any working files like repository files, intermediate compilation results, any intermediate models, etc.xmidirectory holds any input models in the form of XMI 1.1/1.2 files<root>/env.xmlscript establishes a common standard environment for any ModelAnt scripts. Any script should import it directly or indirectly.<root>/base.build.xmlscript establishes common standard environment and targets for building products and components. Any build script should import it and override quite a few targets to provide the component’s specifics.
Component Directories
<meta-model> component directory holds
- any specific files of the meta-model
meta.xmlfile, which defines- any meta-model specific macros
<metamodel name>.load.metamodelmacro loads the meta-model in the repository. No other macros or scripts should refer the metamodel files<metamodel name>.instantiatemacro instantiates the meta-model and allows loading models in it
<component> and <metamodel name>-<component> component directories hold
classes
lib/
src/
java/
jsp/
xml/
.....
test/
java/
jsp/
xml/
.....
build.xml
build.properties
development.properties
classesdirectory holds the compilation results of the local fileslibdirectory holds the component-specific library .jar filessrcdirectory holds the source files in separate sub-directories for each file typesrc/xml/......./antlib.xmlfile is the AntLib definition of the Ant tasks, types and macros this component publishes for ModelAnt use
src/xml/......./private.antlib.xmlfile is the AntLib definition of the Ant tasks, types and macros this component uses locally, but does not publish in the ModelAnt use
testdirectory holds the source files of the component tests. Similar to the source files, they are in separate sub-directories for each file typebuild.xmlfile builds the current component. It imports thebase.build.xmlfile, so building the component’s distribution is done by callingdisttarget. Just compiling it is dine in build target (the default one)build.propertiesfile holds any specific properties the build.xml or any other script needs both in development and in production.development.propertiesfile holds any specific properties (that can even override those in build.properties) the build.xml or any other script needs during the development and testing, but not in production.
This is such a great resource that you are proivding and you give it away for free. I enjoy seeing websites that understand the value of proivding a prime resource for free. I truly loved reading your post. Thanks!