Maven Goals

The Maven plug-in in TIBCO Cloud Integration 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.
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 that 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 runs 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 mock 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 TIBCO Business Studio for BusinessWorks execution reports for the activities that are under unit testing in the TIBCO Business Studio for BusinessWorks application.
  • false: It does not show the failure details in the console logs and TIBCO Business Studio for BusinessWorks execution report for the activities that are under unit testing in the TIBCO Business Studio for BusinessWorks application.

This property can be used along with test and site goals. It is set to true by default from TIBCO 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 for the 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, the 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
independentComponentStartup

This property runs the BWEngine independently even if there are errors in an unused shared resource.

Note: This property gives errors for the reconfigured shared resources and runs the maven goal successfully.

 

  • true: The BWEngine starts independently.

  • false: The BWEngine does not start independently.

Example:

mvn test -DindependentComponentStartup=true
mvn test -DindependentComponentStartup=false 
mvn test -DindependentComponentStartup=true  -DskipInitAllNonTestProcessActivities=true -DskipInitMainProcessActivities=true