Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# BusinessEvents Application POM File

In this version of 6.3.1, the performance has improved significantly due to lack of duplication. All the project build information is consolidated in a single source file called the Maven `pom.xml` file. A parent pom.xml is built-in with the BusinessEvents 6.3.1 installer in BE_HOME. This parent pom.xml inherits all the dependencies in `BE_HOME/lib`. Hence, every BusinessEvents project inherits the dependencies in BE_HOME.

Note: Additionally, you can add Maven dependencies from the parent pom.xml, which is at BE_HOME.

The parent pom.xml specifies its parent as the following:

    <parent>
    	<groupId>com.tibco.cep.be</groupId>
    	<artifactId>runtime</artifactId>
    	<version>6.3.1</version>
    </parent>

In runtime pom.xml, the project property BE_HOME is set in the `Properties` section to resolve the file system paths. BE_HOME setup is not specific to any project and can be overridden by passing it as part of the mvn command. In this version of 6.3.1, the runtime pom.xml has all the build information with empty values. The project-specific pom.xml overrides the empty values with the properties relevant for a specific project. For example, if there is no Docker configuration for a BE project, then the Docker registry configuration information is empty.

Therefore, in a CI/CD, the projects are built without changing the individual pom.xml.

You can edit the generated pom.xml file with the required parameters for building and deploying the BusinessEvents application.

## Third-Party JAR File Dependencies

During the BusinessEvents application pom.xml file generation, the third-party Java libraries found in the project are placed as standard Maven dependencies in the pom.xml file. One dependency entry is created for each JAR file found.

For example, if JUnit.jar is found in the project's build path, the following dependency is added to the pom.xml file:

    <dependency>
      <groupId>com.tibco.be</groupId>
      <artifactId>junit</artifactId>
      <version>0.0.1</version>
    </dependency>

You can edit these dependencies depending on whether the JAR file is a standard JAR file or not. In the case of the standard JAR file, you can replace the dependency with a standard dependency or continue to use the generated dependency. For example:

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
    </dependency>

In the case of a custom JAR file, in addition to the dependency entry in the pom.xml file, install it to the local Maven (`.m2`) repository using the standard Maven command. For example, for a custom JAR file myprojectjar.jar calls the `install` phase and ensure that the `groupId`, `artifactId` and `version` specified in the `install` command are the same as the dependency in the pom.xml file or conversely.

    mvn install:install-file -Dfile=/path/to/myprojectjar.jar -DgroupId=com.tibco.be -DartifactId=myprojectjar -Dversion=0.0.1 -Dpackaging=jar

In case the third-party Java library is not included in the project's build path, you manually add the dependency details (the `<dependency>` tag) for the JAR file in the pom.xml file. After adding the dependency details for the JAR file in the pom.xml file, you must install the JAR file to the local `.m2` repository by using the Maven `install` command. For example, for the JUnit test suit to work in the Maven `test` phase, install the `junit.jar` and the latest `org.hamcrest.core` JAR files to the local `.m2` repository.

## JDK Installation Location

If needed, you can also use your own JDK (or JRE containing `tools.jar`) installation for Maven phase execution. By default, Maven uses the JRE installation path added to the system `PATH` environment variable. You can override that path using the pom.xml file. In the pom.xml file, specify the JDK (or JRE containing `tools.jar`) path in the `<jdkhome>` element. The system then uses the tools.jar file at the `<jdkhome>` location for running Maven phases.

## Project Libraries Dependencies

During the BusinessEvents application pom.xml file generation, the project libraries (`.projlib`) found in the BusinessEvents project build path are placed as standard Maven dependencies in the pom.xml file. One dependency entry is created for each project library file found. The `<type>` tag specifies that this dependency is a project library.

For example:

    <dependency>
      <groupId>com.tibco.be</groupId>
      <artifactId>myprojlib</artifactId>
      <version>0.0.1</version>
      <type>projlib</type>
    </dependency>

In addition to the dependency addition of the project library in the pom.xml file, install the project library in your Maven repository. You can use the BE_HOME/maven/bin/install-projlib utility to install the existing project library for the BusinessEvents project to your repository. See Installing The Project Library to Maven Repository for more details.

## EAR File Location

To run the `compile` phase, specify the location to store the generated EAR file for the BusinessEvents project using the `<earLocation>` tag. The specified location is either a relative or an absolute path on the file system where the generated EAR file is placed. If the path starts with a forward slash (`/`) or a Windows drive (on the Windows platform), it is considered to be an absolute path. Otherwise, the path is relative to the folder containing the pom.xml file. In 6.3.1, the build process is independent of studio tools. This enables parallel execution of multiple projects, boosting the performance.

Note: Ensure that you provide only the location in the `<earLocation>` tag and not the custom EAR file name. The plug-in uses the combination of `artifactId` and `version` for the EAR file name.

## Remote Deployment Repository

To run the `deploy` phase, specify the remote deployment repository location in the pom.xml file using the `<distributionManagement>` and `<repository>` tags.

For example,

     <distributionManagement>
              <repository>
                       <id>central</id>
                       <name>be-releases</name>
                       <url>http://artifacts.tibco.com:8081/artifactory/be-releases</url>
             </repository>
    </distributionManagement>

Also, create the $USER_HOME/.m2/settings.xml file for repository location and authorization. The content of a sample settings.xml file is as follows:

    <?xml version="1.0" encoding="UTF-8"?>
    <settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <servers>
           <server>
             <username>username</username>
             <password>password</password>
             <id>central</id>
           </server>
        </servers>
        <profiles>
           <profile>
              <repositories>
                 <repository>
                    <id>central</id>
                    <name>be-releases</name>
                    <url>http://artifacts.tibco.com:8081/artifactory/be-releases</url>
                </repository>
            </repositories>
            <id>artifactory</id>
          </profile>
        </profiles>
        <activeProfiles>
          <activeProfile>artifactory</activeProfile>
        </activeProfiles>
    </settings>

## Project Library Build Location

To run the `build-project-lib` phase, specify the location to store the generated project library (`.projlib`) file for the BusinessEvents project using the `<projLibLocation>` tag in the pom.xml file. The specified location is either a relative or an absolute path on the file system where the generated project library (`.projlib`) file is placed. If the path starts with a forward slash (`/`) or a Windows drive (on the Windows platform), it is considered to be an absolute path. If not, the path is relative to the folder containing the pom.xml file.

## Project Library Build Resources

If you require to include only certain project resources in the project library (`.projlib`) of your BusinessEvents project, specify those resources under the `<projLibResources>` tag. Thus, when the `build-project-lib` phase is run, only the project resources included in the `<projLibResources>` tag are picked building the project library. Add one entry for each project resource that needs to be included in the project library. For example:

    <projLibResources>
      <projLibResource>Concepts/Customer.concept</projLibResource>
      <projLibResource>Rules/getCustomer.rule</projLibResource>
    </projLibResources>

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.