TIBCO BusinessEvents Maven Plug-in Phases

TIBCO BusinessEvents Maven plug-in overrides the Apache Maven phases with respect to TIBCO BusinessEvents. Thus, executing the same Maven phases, you can build or deploy BusinessEvents applications. The BusinessEvents Maven plug-in also adds a buildProjectLib build lifecycle for building and installing the project library.

The Maven phases refers to the POM file of the BusinessEvents application for the required arguments. See BusinessEvents Application POM File for more details about the BusinessEvents application POM file.

You can make call to execute a Maven phase in the command prompt using the following syntax:

mvn <phase>

In a build lifecycle, the phases are executed sequentially to complete the build lifecycle. It means that whenever you call for a phase to execute in the lifecycle, all the phases before it are completed in sequence, and then the phase that you have called is executed. For example, you have called the install phase:

mvn install
In such cases, first the compile phase is executed, then the test phase is executed, then the package phase is executed, and finally the install phase is executed.

The following tables list (in sequence) all the phases available in the BusinessEvents Maven plug-in.

BusinessEvents Maven Plug-in Phases for Maven default Lifecycle
Phases Description
compile Compiles the BusinessEvents project and generates the EAR file at the location specified in the POM file.

The <earLocation> tag in the POM file, for the BusinessEvents application, specifies the location to store the generated EAR file.

The useLegacy tag in the POM file specifies whether to use Legacy Id or key-based lookup. The default value is false and key-based lookup is enabled for the project.

test Runs BusinessEvents JUnit tests located in the BusinessEvents project (under the JavaSrc folder). The command searches for the BusinessEvents JUnit tests matches the following file names:
  • **/Test*.java
  • **/*Test.java
  • **/*TestCase.java
Note: Ensure that the EAR file location in the JUnit test suite file is same as the EAR file location specified in the POM file.
package Compiles the BusinessEvents project, generates the EAR file, and runs BusinessEvents JUnit tests located in the BusinessEvents project.
install Installs the BusinessEvents project EAR file into your Maven repository.
deploy Deploys the BusinessEvents project EAR and the project library into the remote repository.

To deploy the project library into remote repository, you must first build the project library at the location specified by the <projLibLocation> tag in the POM file.

Specify the remote repository details in the project's POM file and create $USER_HOME/.m2/settings.xml file for repository authorization.

BusinessEvents Maven Plug-in Phases for buildProjectLib Lifecycle
Phases Description
build-project-lib Builds the project library (.projlib) for the BusinessEvents project.

The <projLibLocation> tag in the POM file, for the BusinessEvents application, specifies the location to store the generated project library (.projlib) file.

install-project-lib Installs the project library (.projlib) for the BusinessEvents project to your Maven repository.
BusinessEvents Maven Plug-in Phases for Hot Deploy in TIBCO Enterprise Administrator
Phases Description
hot-deploy Deploys the generated EAR file for the BusinessEvents application deployed on TIBCO Enterprise Administration Agent. All the earlier phases till the install phase are executed and the generated EAR file is deployed on the TIBCO Enterprise Administrator server specified in the pom.xml file.
<teaConfig>
        <teaUrl>http://localhost:8777</teaUrl>
        <applicationName>FraudDetection</applicationName>
        <username>admin</username>
        <password>admin</password>
</teaConfig>
Note:
  • The TIBCO Enterprise Administrator server and TIBCO Enterprise Administration Agent must be running and the respective BusinessEvents application must be deployed on it.
  • The Hot Deploy option in CDD must be selected for hot deployment to work.
BusinessEvents Maven Plug-in Phases for Docker
Phases Description
build-app-image

Builds the Docker image for the TIBCO BusinessEvents application. You can specify the following arguments that are required for the Docker image generation in the pom.xml file.

Copy
<appImageConfig>
    <scriptPath/>
    <docker_dir/>                                                        
    <image_type/>
    <app_location/>                            
    <source/>
    <gv_provider/>
    <help/>                                                        
    <disable_tests/>
    <be_home/>
    <tag/>
    <dockerfile/>
</appImageConfig>

Following are the descriptions for the tags used:

Tag Description
scriptPath

Path to script to be executed

docker_dir

Path to directory where the docker scripts are located.

image_type Type of the image to build ("app"|"rms"|"teagent"|"s2ibuilder")
app_location Path to TIBCO BusinessEvents application where the project CDD, EAR, and optional supporting JAR files are located. This is a required tag if the image-type is app.

source

Path to BE_HOME or TIBCO installers

gv_provider

(Optional) Name of GV provider to be included in the image ("consul"|"http"|"custom")

help

(Optional) Print the usage of script

disable_tests

(Optional) Disables docker unit tests on created image (applicable only for "app" and "s2ibuilder" image types)

tag

(Optional) Name and optionally a tag in the 'name:tag' format

dockerfile

(Optional) Dockerfile to be used for generating image

You can build the Docker image either by using existing TIBCO BusinessEvents installation (BE_HOME) from your computer or by using the software installer of TIBCO BusinessEvents and other required products. The Docker image generated by using software installers is of smaller size in comparison to the Docker image generated by using your TIBCO BusinessEvents installation.

  • Docker image by using software installers - Set <useBEHome> to false and provide location of the TIBCO BusinessEvents, TIBCO ActiveSpaces, and other add-ons installers in <installers_location>.
  • Docker image by using existing TIBCO BusinessEvents installation - Set <useBEHome> to true and provide BE_HOME path in <be_home>.

For more details about arguments required for Docker, see "Building BusinessEvents Application Docker Image" section in the TIBCO BusinessEvents Cloud Deployment Guide.

Note: In macOS platform, ensure to provide the system PATH as environment variable in the Run configuration. In TIBCO BusinessEvents Studio, right click the project name and select Run As > Run Configurations > <Target_run_configuration>. In the Environment tab, add a variable PATH and provide its value same as the $PATH environment variable value from system.
docker-install Executes all the earlier phases for Dockerfile and installs the BusinessEvents project EAR file into your Maven (.m2) repository.
docker-deploy Creates a tag for generated application image and deploys the tagged image to specified docker registry. All the previous phases are executed and then the docker-deploy phase is executed.
Note: For deploying to Amazon Web Services (AWS), you must have AWS Command Line Interface (CLI) installed and configured on system.

You can specify the following arguments that are required for deploying the application Docker image in the pom.xml file. Specify the repository name and URL required for the deployment.

Copy
<dockerRegistryConfig>
       <property>
            <key>Repository</key> //Repository Name
            <value/>
       </property>
       <property>
             <key>Url</key>   //Repository Url
             <value/>
       </property>
       <property>
              <key>TagImage</key>   
              <value>RepositoryName:ImageName</value>
        </property>
</dockerRegistryConfig>