# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # $Id: readme.txt 546357 2007-06-12 02:12:58Z ate $ A n d r o M D A - 3.2 AndroMDA is an open-source MDA framework distributed under the BSD license. Go to http://www.andromda.org/ for more information. The project located in this directory has been generated by Philip Mark Donaghy using the andromdapp:generate Maven plugin. You should at least be running Maven 2.0.1 if you want to build your project without any Maven-related problems, below is a summary of what has been generated and a list of example goals to call from the command line. The generated project structure is well-tailored for use in the development of J2EE projects. The build process itself makes use of Maven, dependencies and often-used goals have been added for your convenience. Custom configuration can be done by updating the root pom.xml file. /network-monitor J2EE project | | The root of the project contains a few files that control the overall | build process and common properties (in the pom.xml). | |-- pom.xml | contains information about this project, you may add more information | as long as you do not violate the Maven POM schema, see | http://maven.apache.org/reference/project-descriptor.htmlt | +-- /mda | | | | The MDA module is the heart of this project, this is where | | AndroMDA is configured to generate the files needed to | | assemble the application | | | +-- pom.xml | | contains the AndroMDA dependencies and configuration (cartridges, translation-libraries, etc) | +-- /src | | additional sources such as merge-mappings can be | | placed here, check out the /main/uml directory, it contains | | the UML model from which AndroMDA will generate code | +-- /src/main/config/andromda.xml | configures AndroMDA and its components, most | importantly the cartridges which are listed in | their own namespace; global settings are done in the | 'default' namespace | +-- /common | | | | The COMMON module collects those resources and classes | | that are shared between the other modules. | | | +-- pom.xml | | lists common dependencies | +-- /model | shared resources and java sources are generated here, | such as value objects and exceptions | +-- /target | class files are compiled here and the common jar is | packaged here | +-- /core | | | | The CORE module collects those resources and classes | | that use the Spring framework, optionally making | | use of Hibernate and/or EJB under the hood. | | | +-- pom.xml | | lists Spring dependencies | +-- /src/main/java | | Spring classes that need manual implementation are | | generated here, they will not be overwritten upon | | regeneration; this includes the service, DAO and | | entity implementations | +-- /model | the Spring resources and java sources here will be | overwriten each time AndroMDA generates new code | using the Spring cartridge | +-- /target | class files are compiled here and the core jar is | packaged here | +-- /web | | | | The WEB module collects all resources and classes | | that make up the presentation layer, as well as | | bundling all other modules to create a deployable war. | | | +-- pom.xml | | lists WebApp dependencies | +-- /src/main/java | | controller implementations and editable resource bundles | | will be generated here, | | you might consider putting your own JSPs here to | | be copied over the generated ones when bundling the | | .war file | +-- /model | | the web sources, struts config, and messages are generated | | here | +-- /target | a deployable war is bundled here | In order to succesfully build your project you will need to know how to invoke the build process for the existing modules, here's a list of examples: %> mvn install simply builds all modules %> mvn clean cleans all generated files from each target directory %> mvn install -Denv=prod builds the entire application for the production environment, possible 'env' property values are 'prod' for production, 'val' for validation and 'dev' for development; not specifying any value for this property will build the application for the local configuration (more info at http://maven.apache.org/guides/introduction/introduction-to-profiles.html) %> mvn -N andromdapp:build -Dmodules=core (or mvn -f core/pom.xml) only build the core module %> mvn -N andromdapp:build -Dmodules=web (or mvn -f web/pom.xml) only build the web module %> mvn nuke cleans out all /target directories and removes all Java classes with names ending with 'Impl' from the source directories (from the common, core and web modules); this goal asks for confirmation, but be careful calling it anyway as you will lose your manually edited files %> mvn -N andromdapp:build -Dmodules=mda:[andromda:start-server] (or mvn -f mda/pom.xml andromda:start-server) starts the AndroMDA server, with this server running you will be able to significantly speedup the generation process although it will require you to use another console while it is running %> mvn -N andromdapp:build -Dmodules=mda:[andromda:stop-server] (or mvn -f mda/pom.xml andromda:stop-server) stops the AndroMDA server %> mvn -N andromdapp:build -Dmodules=mda (or mvn -f mda/pom.xml) runs AndroMDA on your model and thereby generating files in the subdirectories of the existing modules %> mvn -N andromdapp:build -Dmodules=mda -Dfilter=java,bpm4struts (or mvn -f mda/pom.xml -Dfilter=java,bpm4struts) runs AndroMDA, but this time only using the Java and BPM4Struts cartridges (in that order) %> mvn -N andromdapp:build -Dmodules=mda -Dfilter=~java,bpm4struts (or mvn -f mda/pom.xml -Dfilter=~java,bpm4struts) runs AndroMDA, but this time using all cartridges *except* the Java and BPM4Struts cartridges %> mvn -N andromdapp:build -Dmodules=mda,core,web -Dfilter=java runs AndroMDA using only the Java cartridge, rebuilds the core module and web module %> mvn -N andromdapp:build -Dconsole runs the AndroMDApp build goal in 'console' mode, once running, this allows you to execute any goal or subproject goal in the manner described above without having to specify the andromdapp:build goal or restarting maven (i.e. you can run the mda goal by typing 'mda', build the core module by type 'core', etc). Please note that you may use the '-o' flag at any time to avoid having Maven downloading any SNAPSHOT dependencies. Each module will install its artifact into the local Maven repository, this might be a directory looking like this: (Windows) C:\Documents and Settings\Philip Mark Donaghy\.m2\repository\network-monitor\ (*nix) /home/Philip Mark Donaghy/.maven/repository/network-monitor/ For questions or feature requests please use our mailing list or the Andromda forum: bridges-user-subscribe@portals.apache.org bridges-user-unsubscribe@portals.apache.org http://forum.andromda.org/ Good luck! -- The AndroMDA Team