BusinessEvents Application POM File
After the POM file for the BusinessEvents application is generated, you can edit the POM file with required parameters for building and deploying the BusinessEvents application.
Third-Party JAR File Dependencies
During the BusinessEvents application POM file generation, the third-party Java libraries found in the project are placed as standard Maven dependencies in the POM 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 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 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 case of a custom JAR file, in addition to the dependency entry in the POM file, install it to the local Maven (.m2
) repository using the standard Maven command. For example, for a custom JAR file
myprojectjar.jar call the
install
phase and ensure that the
groupId
,
artifactId
and
version
specified in the
install
command are same as the dependency in the POM file or vice versa.
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, then you have to manually add the dependency details (the
<dependency>
tag) for the JAR file in the POM file. After adding the dependency details for the JAR file in the POM file, you must install the JAR file to the local
.m2
repository by using the Maven
install
command. For example, for 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 phases 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 located at the
<jdkhome>
location for executing maven phases.
Project Libraries Dependencies
During the BusinessEvents application POM file generation, the project libraries (.projlib
) found in the BusinessEvents project build path are placed as standard Maven dependencies in the POM 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 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 execute 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. If not, the path is relative to the folder containing the POM file.
<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 execute the
deploy
phase, specify the remote deployment repository location in the POM 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 execute 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 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 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 executed, only the project resources included in the
<projLibResources>
tag are picked building the project library. Add one entry for each project resource that need to be included in the project library. For example:
<projLibResources> <projLibResource>Concepts/Customer.concept</projLibResource> <projLibResource>Rules/getCustomer.rule</projLibResource> </projLibResources>