-
Notifications
You must be signed in to change notification settings - Fork 80
Custom XPath Function with Maven
Please follow below steps to use Custom XPath Function(CXF) with BW -
-
Follow the steps at TIBCO BW6 Documentation to create Custom XPath Project - Creating Custom XPath Functions
-
Create Sample BW Application which is using the Custom XPath Function created above.
- Ensure that the Custom XPath function(CXF) Project is added in Application
Includes
as below
- Launch Generate POM file wizard. You should see XPath function Project in the list
The parent project pom.xml should list down all the modules as below -
<modules>
<module>../CXFDemo</module>
<module>../CXFTest.module</module>
<module>../CXFTest</module>
</modules>
- Add cxf common extension dependency in Custom XPath Function project pom.xml
Note - This step is not required for BW 6.8.0/ BWCE 2.7.0 onwards.
Note - The dependency artifact version is depend on BW version you are using.
To install execute command -
mvn install:install-file -Dfile=<path-to-cxf-common-jar> -DgroupId=com.tibco.plugins -DartifactId=com.tibco.xml.cxf.common -Dversion=<version> -Dpackaging=jar
Example - mvn install:install-file -Dfile=C:\tibco\bw\6.6\system\shared\com.tibco.xml.cxf.common_1.3.600.001.jar -DgroupId=com.tibco.plugins -DartifactId=com.tibco.xml.cxf.common -Dversion=1.3.600 -Dpackaging=jar
- Add below pom dependency in custom xpath function project pom.xml
<dependencies>
<dependency>
<groupId>com.tibco.plugins</groupId>
<artifactId>com.tibco.xml.cxf.common</artifactId>
<version>1.3.600</version>
<scope>provided</scope>
</dependency>
</dependencies>
- Create bwutdev.properties file.
In your user home directory, create bwutdev.properties
file (example - on windows, C:\Users\<user>\bwutdev.properties
Add your XPath function project entry in the file.
CXFDemo=bin,target/classes
Note - From 2.8.0 onwards, this step is optional. Plugin will generate
dev.properties
file. However, if needed, you can override same by providingbwutdev.properties
file as mentioned above.
Note - Your BW application should have unit tests defined. Please refer Unit Testing section on the Wiki.
Note -
tibco.home
andbw.home
properties should be provided in application pom.xml.
-
Create new Maven Run configuration. Select BW application parent project as base directory.
-
Provide maven goal
clean test
. -
To generate an EAR, Provide maven goal
clean package
.
Please follow the below steps to use External Custom XPath Function(CXF) with BW -
Create new Custom XPath Project - "cxfpro". Right Click, Select option "Generate POM for CXF Project". It will mavenize the project and generates pom.xml for the CXF Project.
Create new "Run\Debug Configuration" for Maven. Select CXF Project and execute "clean install" goal. This will install the CXF Project in local .m2 repository.
Open new eclipse workspace. Create new application project. Generate POM for your Application by right clicking on the Application and choosing the 'Generate POM for Application' menu item.
Open the Application Module pom.xml and add the CXF Project dependency which is present in local maven repository. In this example I have a CXFPRO jar file which is in ~/.m2/repository folder
Save your pom.xml
You should now see the CXF Project in the Studio Project Explorer. Note the different icon for the project which indicates that the CXF Project is referenced and not in the workspace. Right click on CXF Project and choose "Install CXF Project" to start using Custom Functions in the BW project.
Running Unit Tests & Package
Note - Your BW application should have unit tests defined. Please refer Unit Testing section on the Wiki.
Note - tibco.home and bw.home properties should be provided in application pom.xml.
Create new Maven Run configuration. Select BW application parent project as base directory.
Provide maven goal clean test.
To generate an EAR, Provide maven goal clean package.
Getting started
- Steps to Mavenize BW Application
- Building applications for BWCE
- EAR deployment with Config File
- Shared Modules with Maven
- Add Process Diagram in EAR
- BW Design Utility Goals
- CI/CD using Jenkins
- Custom XPath Function
- Deploy Shared Module on Remote Repository
- TCI Deployment using Maven Plugin
Unit Testing
- Primitive Assertion
- Activity Assertion
- Activity Assertion with Gold Input File
- Mock Output
- Mock Fault
- Test Suite
- Plugin Properties
Help & Contribute