Log In | Sign Up   View a printable version of the current page.
  Dashboard > flexive > ... > Checking out and working with the sources > Build Targets

Added by Markus Plesser, last edited by Markus Plesser on Dec 29, 2008  (view change)
Labels: 
(None)

Build targets

The whole [fleXive] framework utilizes ANT as its build system.

The following list represents the most useful targets (invoked using ant <target>):

target description
all Builds the flexive.ear file
build-deploy Build flexive (using jar.all) and deploy the archive (using deploy)
checkstyle Runs a checkstyle source code analysis
clean Cleans all generated files except the parsers
clean.all Like clean but cleans parser files as well
db.update (re)creates the MySQL database
db.update.test (re)creates the MySQL test database
db.noupdate Skip db updates, useful for tests
deploy Assembles and deploys the ear file to JBoss
redeploy.web.jboss Redeploy all web-related files (xhtml, etc.) to an already deployed ear in JBoss
dist Build a distribution of all jars, wars and ears in directory ./dist
findbugs Runs a findbugs byte code analysis
jar.all Builds all archives, but does not assemble the flexive.ear file
javadoc Generates the flexive Javadoc pages in ./javadoc
pmd Runs a PMD source code analysis
tests.all Runs all tests (including embedded container tests)
tests.shared Execute all shared tests
tests.ejb* Executes ejb tests in the embedded JBoss container
tests.ejb.debug* like tests.ejb but starts the VM in debug mode; suspended until a debugger attaches
tests.jsf* Executes test for the JSF backing beans
tests.groups Executes all tests set in the property tests.groups (e.g. ant tests.groups -Dtests.groups=shared,configuration)
tests.debug.enable Enables debugging (e.g. ant tests.debug.enable tests.jsf)
h2.start Start the bundled H2 database
h2.stop Stop the bundled H2 database
h2.web Launch the H2 web console

* Requires setup of the JBoss embedded container or starting with version 3.1 the bundled OpenEJB container (see Running Unit Tests)

Common targets:
ant clean db.update emma.enable -Dtests.emma.enabled=true tests.all ... run all tests and gather coverage information
ant db.noupdate tests.groups -Dtests.groups=structure ... run group "structure" without updating the database

Build properties

The build process, especially test targets, can be customized via system properties. They may be set in build.properties or passed on the command line, e.g. ant tests.ejb -Dtests.emma.enabled=true.

parameter values targets description
tests.emma.enabled true|false tests.* enables or disables emma code coverage instrumentation
tests.groups comma-separated list of test group names tests.groups allows selective testing of test groups (see the annotations on top of each test class)

Build How-To's

Running a testgroup with code coverage

If you want to run the tests in test group "tree" for example and not update the test database prior to the run, you have to run

ant clean db.noupdate tests.groups -Dtests.emma.enabled=true -Dtests.groups=tree
Site running on a free Atlassian Confluence Open Source Project License granted to [fleXive] . Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.1 Build:#916 Nov 09, 2007) - Bug/feature request - Contact Administrators