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.
- 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
- Add to class path
/opt/IBM/WebSphere/AppServer/profiles/ctgAppSrv01/installedApps/ctgCell01/maximo.ear/META-INF
editMANIFEST.MF
Add the following line in the endClass-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)
- Copy groovy.jar to lib folder in Maximo’s installation directory.
e.g.
/opt/IBM/SMP/maximo/applications/maximo/lib
- 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 appendlib/groovy.jar
e.g. I changed property after addinglib/groovy.jar
in it. The sample edited value is below
<property
name="maximo.businessobjectsclasspath"
value="${maximo.propertiesjarfile}
- Edit
buildmaximoear-build.xml
In same directory. Again addlib/groovy.jar
in the value attribute of<property name="maximo.businessobjectsclasspath"
<property
name="maximo.businessobjectsclasspath"
value="${maximo.propertiesjarfile}
- Re build and re deploy Maximo
After following any of the above methods. Groovy will start showing as a scripting language in Maximo