Overview

All ActiveWAFL applications start with a default Build.xml file that can be used with Ant.
Target names follow ActiveWAFL conventions.

In addition to the build file, there are some configuration files for third-party tools used during the build.

  • PhpUnit.xml

Default Ant Targets

Build, Clean,  PrepareBuild, CheckPhpSyntax,  MeasureProjectSize, CalculatePhpCodeQuality,  DetectPhpMesses, DetectDuplicatePhpCode,  ValidatePhpCodingStandard,  RunUnitTests, RunIntegrationTests,  RunDatabaseUpdates, AggregateBuildReports,  BackupBuildReports, GetLatestActiveWafl,  DeployToProductionServer, DeployToTestServer,  DeployToStagingServer

Build

The Build target is just a container for several targets that can be combined to create a build process.
The Build target will execute the following targets, in order as listed.

  1. PrepareBuild
  2. CheckPhpSyntax
  3. MeasureProjectSize
  4. CalculatePhpCodeQuality
  5. DetectPhpMesses
  6. ValidatePhpCodingStandard
  7. DetectDuplicatePhpCode
  8. RunDatabaseUpdates
  9. RunUnitTests
  10. AggregateBuildReports

Clean

Cleanup the artifacts left over by the last build.

PrepareBuild

Prepare for the build by creating any needed directories.

Also, PrepareBuild will run the following targets that it depends on, in order as listed.

  1. Clean
  2. GetLatestActiveWafl

CheckPhpSyntax

Check PHP syntax with php -l

MeasureProjectSize

Measure project size using phploc.

CalculatePhpCodeQuality

Calculate software metrics using PHP_Depend.

DetectPhpMesses

Perform project mess detection using phpmd creating a log file for the continuous integration server

DetectDuplicatePhpCode

Find duplicate code using phpcpd

ValidatePhpCodingStandard

Find ActiveWAFL coding standard violations using PHP_CodeSniffer creating a log file for the continuous integration server

RunUnitTests

Run unit tests with PHPUnit

RunIntegrationTests

Run integration tests with PHPUnit

RunDatabaseUpdates

Run database updates according to the last checked-in Config/More/Build/DataStorage/NextUpdate.sql (or whatever file you have configured in your data storage settings.)

AggregateBuildReports

Aggregate tool output with PHP_CodeBrowser

BackupBuildReports

Backup the build logs so a history can be kept

GetLatestActiveWafl

Get latest ActiveWAFL framework and its dependencies.

DeployToProductionServer

Deploy the website to live production virtual host on local machine

DeployToTestServer

Deploy the website to live test virtual host on local machine

DeployToStagingServer

Deploy the website to live stage virtual host on local machine

Coding Standards

ActiveWAFL follows the conventions and standards as defined by wafl.org.
Violations of this standard will be reported during the build process.
Too many violations will result in an unstable build.