
templates.j2ee.maven2.mda.readme.txt.vsl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of andromda-andromdapp-project-j2ee-maven2
Show all versions of andromda-andromdapp-project-j2ee-maven2
AndroMDA powered J2EE Maven2 Application
The newest version!
A n d r o M D A - $andromdaVersion
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 $author
using the andromdapp:generate Maven plugin.
You should at least be running Maven 2.0.10 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.
Version 2.0.10 has the fewest known significant bugs.
More info on maven is available at http://maven.apache.org.
An excellent guide (Better Builds with Maven) pdf download is available at
http://www.devzuz.com/web/guest/products/resources#BBWM.
The standard lifecycle goals (each goal depends on all previous goals) are:
generate-sources, process-sources, compile, generate-test-*, test-compile,
test, package, install, deploy. install is the default goal.
If you want to import each subdirectory into Eclipse as an individual project,
follow the instructions in mda/eclipse.bat. The pom.xml files are set up for this
option to work by default.
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.
pom.xml files in directories under the root inherit the root configuration.
#if ($modelType.equals("uml2"))
Magic Draw 11.5 (or above) is supported via its 'Export to EMF-UML2' feature. You'll notice
that the andromda.xml is already configured to load these exported files. It expects
that a model called '$applicationId' has been created within your Magic Draw model.
Important: before launching AndroMDA, be sure to have exported your model.
#end
/$applicationId 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/ref/current/maven-model/maven.html
|
| Generated sources are in target/src/main/java in each subdirectory
| Implementation sources are under /src in each subdirectory
|
+-- /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/main/uml
| | contains the UML model from which AndroMDA will generate code
| +-- /src/main/config/mappings
| | additional sources such as merge-mappings can be
| | placed here
| +-- /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
| +-- /target
| shared resources and java classes are generated here,
| such as value objects and exceptions
|
#if ($ejb || $ejb3)
+-- /core
| |
| | The CORE module collects those resources and classes
| | that use the EJB framework
| |
| +-- pom.xml
| | lists EJB[3.0] dependencies
| +-- /src/main/java
| | EJB[3.0] classes that need manual implementation are
| | generated here, they will not be overwritten upon
| | regeneration
| +-- /target
| the EJB[3.0] classes here will be overwriten each time
| AndroMDA generates new code using the EJB[3.0] cartridge
|
#end
#if ($hibernate)
+-- /core
| |
| | The CORE module collects those resources and classes
| | that use the Hibernate framework
| |
| +-- pom.xml
| | lists Hibernate dependencies
| +-- /src/main/java
| | Hibernate classes that need manual implementation are
| | generated here, they will not be overwritten upon
| | regeneration; these are the entities containing
| | business methods
| +-- /target
| the Hibernate resources and classes here will be
| overwriten each time AndroMDA generates new code
| using the Hibernate cartridge; this includes both
| the entities and the *.hbm.xml mapping files.
| You'll also find the DDL for creating and dropping
| your schema within this directory.
|
#end
#if ($spring)
+-- /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
| +-- /target
| the Spring resources and classes here will be
| overwriten each time AndroMDA generates new code
| using the Spring cartridge; this includes both
| the Hibernate entities and the correponding
| *.hbm.xml mapping files as well as the service
| and DAO base classes. You'll also find the DDL
| for creating and dropping your schema within this
| directory.
|
#end
#if ($cxf)
+-- /core
| |
| | The CORE module collects those boundary resources and classes
| | that use the CXF web services framework
| |
| +-- pom.xml
| | lists CXF dependencies
| +-- /src/main/java
| | Boundary classes that need manual implementation are
| | generated here, they will not be overwritten upon
| | regeneration; this includes
| | entity implementations
| +-- /target
| the CXF resources and classes here will be
| overwriten each time AndroMDA generates new code
| using the Spring cartridge; this includes boundary
| classes, service endpoints / interfaces, and request/
| response wrapper classes.
|
+-- /CXF
| |
| | The CXF module is a temporary holding area for results of the
| | wsdl2java and java2wsdl utilities. Not all required classes are
| | generated by the webservices cartridge, the rest must be copied from
| | the CXF project to the core and webservices projects. This also shows
| | potential problems with the generated code if the java <-> wsdl process
| | is not bidirectional
| |
| +-- /target/src/main/java
| | Generated java classes from the wsdl
| +-- /src/main/webapp
| Web context root directory, containing META-INF, WEB-INF, and wsdl
|
#end
#if ($workflow)
+-- /workflow
| |
| | The Workflow module collects those resources and classes
| | that are needed to support the workflow engine
| |
| +-- pom.xml
| | lists Workflow dependencies
| +-- /src/main/sar
| | files used to configure the workflow engine connection,
| | please note that these files contain properties
| | that will be dynamically replaced during the build
| +-- /target
|
#end
#if ($web)
+-- /web
| |
#if ($ear)
| | The WEB module collects those resources and classes
| | that make up the presentation layer.
#else
| | 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.
#end
| |
| +-- 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
| +-- /target
#if ($ear)
| any JSF classes, JSPs, resource bundles and
| configuration files are generated here
#else
| a deployable war is bundled here
#end
|
#end
#if ($webservice)
+-- /webservice
| |
| | The WEBSERVICE module collects those resources and
#if ($axis)
#if ($axisVersion.equals("1"))
| | classes that expose your webservices using the Axis framework
#else
| | classes that expose your webservices using the Axis2 framework
#end
#elseif ($xfire)
| | classes that expose your webservices using the XFire framework
#elseif ($cxf)
| | classes that expose your webservices using the Apache CXF framework (http://incubator.apache.org/cxf)
#elseif ($jaxws)
| | classes that expose your webservices using Sun's Jax-WS reference implementation
#end
| |
| +-- pom.xml
| | lists any dependencies for webservices
| +-- /target
| generated files (like the WSDLs, etc) are emitted here
|
#end
#if ($ear)
+-- /app
|
| The APP module collects those resources and classes
| that are required to actually build the .ear bundle
|
+-- pom.xml
| lists dependencies to be bundles into the
| root of the .ear
+-- /src
| any custom resources that should be deployed
| together with the application
| (eg. server deployment descriptors)
+-- /target
a deployable application is bundled here
#end
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:
Please note that you may use the '-o' flag at any time to avoid
having Maven downloading any SNAPSHOT dependencies.
%> mvn install
simply builds all modules
%> mvn -o install
builds all modules in offline mode - does not check remote repositories for updates or downloads
%> mvn install -Dmaven.test.skip=true
builds all modules and skips all automatic tests (i.e. surefire expected/actual)
%> mvn install -Dmaven.test.failure.ignore=true
builds all modules and run all automatic tests but does not stop if a test failure
%> mvn install -fae
builds all modules and run all automatic tests, reports all failures at the end
#if ($ear)
%> mvn -f app/pom.xml -Ddeploy
#else
%> mvn -f web/pom.xml -Ddeploy
#end
collects all artifacts and builds a deployable .$applicationType which is then
deployed
%> mvn clean
cleans (recursively removes) all files from each target directory
%> mvn -f mda/pom.xml install
Generates the source files, without compilation or deployment. Or run 'mvn install' from the mda subdirectory.
%> mvn install -Ddeploy
rebuilds the entire application and deploys
%> 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 -f web/pom.xml andromdapp:undeploy -o
undeploys the $applicationType from your app server
%> mvn -N andromdapp:build -Dmodules=core (or mvn -f core/pom.xml)
only build the core module
#if ($workflow)
%> mvn -N andromdapp:build -Dmodules=workflow (or mvn -f workflow/pom.xml)
only build the workflow module
#end
#if ($web)
%> mvn -N andromdapp:build -Dmodules=web (or mvn -f web/pom.xml)
only build the web module
#end
%> mvn -f core/pom.xml org.andromda.maven.plugins:andromdapp-maven-plugin:schema -Dtasks=create
generates the DDL create code and subsequently tells the database
to create the schema for the entities under app/target/schema*.sql
%> mvn -f core/pom.xml org.andromda.maven.plugins:andromdapp-maven-plugin:schema -Dtasks=drop
generates the DDL drop code and subsequently tells the database
to drop the schema for the entities
%> mvn -f core/pom.xml org.andromda.maven.plugins:andromdapp-maven-plugin:schema -Dtasks=drop,create
generates the drop and create DDL code and subsequently tells the database
to drop and then create the schema for the entities
%> mvn -f core/pom.xml org.andromda.maven.plugins:andromdapp-maven-plugin:schema -Dtasks=update
attempts to update the database schema with incremental changes, might not work with all JDBC drivers
see http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#toolsetguide-s1-6
%> mvn -f core/pom.xml org.andromda.maven.plugins:andromdapp-maven-plugin:schema -Dtasks=validate
validates the current Hibernate mappings against the database, you can also use this to simply
check whether or not the mappings have been properly generated (in case of customizations)
%> 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,hibernate (or mvn -f mda/pom.xml -Dfilter=java,hibernate)
runs AndroMDA, but this time only using the Java and Hibernate
cartridges (in that order)
%> mvn -N andromdapp:build -Dmodules=mda -Dfilter=~java,hibernate (or mvn -f mda/pom.xml -Dfilter=~java,hibernate)
runs AndroMDA, but this time using all cartridges *except*
the Java and Hibernate cartridges
#if ($ear)
%> mvn -N andromdapp:build -Dmodules=mda,core,web,app -Dfilter=java -Ddeploy
#else
%> mvn -N andromdapp:build -Dmodules=mda,core,web -Dfilter=java -Ddeploy
#end
runs AndroMDA using only the Java cartridge, rebuilds the core
module and web module and deploys afterwards
%> 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).
%> mvn compile:compile
compile all sources
%> mvn process-sources
generates and compiles all sources from the model(s) without installing/deploying
Each module will install its artifact into the local Maven repository,
this might be a directory looking like this:
(Windows)
C:\Documents and Settings\${author}\.m2\repository\${applicationId}\
(*nix)
/home/${author}/.m2/repository/${applicationId}/
For questions or feature requests please use our forum:
http://forum.andromda.org/
Good luck!
-- The AndroMDA Team
© 2015 - 2025 Weber Informatics LLC | Privacy Policy