Add Groovy support to IBM Maximo / ICD
Add Groovy support to IBM Maximo / ICD

Add Groovy support to IBM Maximo / ICD

Created
Nov 22, 2021 06:44 AM
Tags
groovy
configuration
Status
Completed
Created Date
Groovy has similar syntax like Java and is JSR223 compatible. It can be added as a scripting language to IBM Maximo just like jython, python etc.
It is JVM based and some people will be more comfortable using it than other available languages.
To add groovy support in IBM Maximo follow the following steps.

1. Download groovy.jar

First of all download groovy.jar.
For me the following jar file worked
https://drive.google.com/drive/folders/10gWxikGFNsfjMrWOJ4exDeBGAEIGMubl?usp=sharing You may try downloading an alternate from Groovy’s official site.

2. Enable Groovy support in Maximo

There are two methods to enable groovy support in Maximo
ℹ️
There are two methods to enable groovy support in Maximo. Quick Addition does not require rebuild of ear file but this needs be done after each ear file deploy Proper Addition requires once re build and re deployment of ear file.
Quick addition (requires only restart of server)
Note: In this method whenever you rebuild and redeploy maxim's ear you have to do these steps again.
  1. Copy the groovy.jar file to the directory where Maximo is running from. IT is the path where your maximo's .ear file is located. Its not the SMP directory e.g. /opt/IBM/WebSphere/AppServer/profiles/ctgAppSrv01/installedApps/ctgCell01/maximo.ear/lib
  1. Add to class path /opt/IBM/WebSphere/AppServer/profiles/ctgAppSrv01/installedApps/ctgCell01/maximo.ear/META-INF edit MANIFEST.MF Add the following line in the end Class-Path: lib/groovy.jar 3. Restart your maximo server Groovy will now be available as a scripting language.
Proper Addition (requires rebuild and re deploy)
  1. Copy groovy.jar to lib folder in Maximo’s installation directory. e.g. /opt/IBM/SMP/maximo/applications/maximo/lib
  1. Edit buildmaximoear.xml Go to Maximo installation directory e.g. in my case it is /opt/IBM/SMP/maximo/deployment There will be tag <property name="maximo.businessobjectsclasspath" in its value append lib/groovy.jar e.g. I changed property after adding lib/groovy.jar in it. The sample edited value is below
    1. <property 
      	name="maximo.businessobjectsclasspath" 
      	value="${maximo.propertiesjarfile} 
      buildmaximoear.xml
  1. Edit buildmaximoear-build.xml In same directory. Again add lib/groovy.jar in the value attribute of <property name="maximo.businessobjectsclasspath"
    1. <property 
      	name="maximo.businessobjectsclasspath" 
      	value="${maximo.propertiesjarfile} 
  1. Re build and re deploy Maximo
After following any of the above methods. Groovy will start showing as a scripting language in Maximo
notion image