Maven Goals

The Maven plug-in in ActiveMatrix BusinessWorks simplifies the build process and enhances project management by providing a structured approach. It helps streamline the process of building, managing, and deploying software projects by automating tasks such as compiling source code, managing project dependencies, and creating distributable artifacts.

Maven goals
Lifecycle Phases Description
clean Removes all files generated by the previous build ex-target folder.
generate-sources Generates any source code for inclusion in compilation.
install Installs the package into the local repository, for using as a dependency in other projects locally.
Note: When you configure the POM file to be deployed on AppSpace, the EAR is deployed on the respective AppNode.
test Tests the compiled source code using a suitable unit testing framework. These tests do not require the code to be packaged or deployed.
site To generate a report (target > site > bwcoverage.html/bwtest.html).
validate To validate whether a project is correct, and all the necessary information is available.
package Takes the compiled code and packages it in its distributable format, such as a JAR. The EAR is generated in the same workspace.
compile Compiles the source code of the project.
verify Runs the checks if any on the results of integration tests to ensure quality criteria are met.
deploy Run in the build environment. It copies the final package to the remote repository for sharing with other developers and projects.

The default Maven lifecycle consists of multiple phases. Some of them are mentioned in the above table that are executed in a sequential order to complete the project build process.

Considering the lifecycle phases above, the Maven plug-in performs the following steps when a default lifecycle is used:

  1. Maven validates the project first.

  2. Tries to compile the sources.

  3. Runs those against the tests.

  4. Packages the binaries (for example, jar/ear).

  5. Runs integration tests against that package.

  6. Verifies the integration tests.

  7. Installs the verified package to the local repository.

  8. Deploys the installed package to a remote repository.

Here, the Maven > install command follows the default lifecycle.

Maven Plug-in Properties

Property Description Values
disableMocking To disable mocking for all mocked activities of the BusinessWorks application.
  • true: Disables mocking for all mocked activities of the BusinessWorks application.
  • false: Enables mocking for all mocked activities of the BusinessWorks application.

This property can be used along with "test" and "site" goals.

Example:

mvn test -DdisableMocking=true
disableAssertions To disable assertions added for all activities of the BusinessWorks application.
  • true: Assertions cannot run for all activities that are under unit testing in the BusinessWorks application.
  • false: Assertions are run for all activities that are under unit testing in the BusinessWorks application.

This property can be used along with "test" and "site" goals.

Example:

mvn test -DdisableAssertions=true
showFailureDetails To show provided input and Gold input in case of test failure.
  • true: It shows the failure details in the console logs and BusinessWorks execution report for the activities that are under unit testing in the BusinessWorks application.
  • false: It does not show the failure details in the console logs and BusinessWorks execution report for the activities that are under unit testing in the BusinessWorks application.

This property can be used along with "test" and "site" goals. It is set to "true" by default from BusinessWorks Maven Plug-in 2.7.1 and above.

Examples:

mvn test -DshowFailureDetails=true
mvn site -DshowFailureDetails=true
testSuiteName To run the Test suite. Provide the test suite name as a value to the property while running the "test" goal. This property can be used along with "test" and "site" goals.

Example:

mvn test -DtestSuiteName=ActivityAssertionTestSuite.bwts

You can also run multiple test suites in sequence by providing the test suite names separated by a semicolon ";".

mvn test -DtestSuiteName=ActivityAssertionTestSuite.bwts;FaultTestSuite.bwts
customArgEngine To pass the custom argument property file when starting the BWEngine, create a .properties file that has the list of custom arguments in the form of -Dkey=value. The path of the same .properties file must be passed to the customArgEngine property. This property supports Absolute path, Relative path, and URL-based file path.
Note: In case of relative path, you must keep the "properties" file in the Application Project.

Example:

mvn test -DcustomArgEngine="D:\Issues\customArgEngine\sample.properties"

where, sample.properties file has the list of custom arguments.

skipInitMainProcessActivities To skip init for all main process activities.
  • true: It skips init for all main process activities.
  • false: It initiates the main process activities.

Examples:

mvn test -DskipInitMainProcessActivities=true
mvn site -DskipInitMainProcessActivities=false
skipInitAllNonTestProcessActivities To skip init for all non-unit test process activities.
  • true: It skips init for all non unit test process activities.
  • false: It initiates all non unit test process activities.

Examples:

mvn test -DskipInitAllNonTestProcessActivities=true
mvn site -DskipInitAllNonTestProcessActivities=false
startOnDeploy To restrict an application to auto-start after deployment. By default the value of startOnDeploy is "true".
  • true: It auto-starts the application after deployment.
  • false: It does not auto-start the application after deployment.

Example:

mvn install -DstartOnDeploy=false