DITA-OT Custom jars

Post here questions and problems related to oXygen frameworks/document types.
msambasiva
Posts: 40
Joined: Tue Jul 17, 2018 6:57 am

DITA-OT Custom jars

Post by msambasiva » Thu May 21, 2020 11:53 am

Hi,

DITA-OT 2.4.6

We have developed a DITA-OT plugin which is using custom jar. The custom jar itself using some other third party jars. So to make it work, I am copying the custom jar & dependent jars into <DITA-OT>/lib.
How best we can avoid manually copy the custom jar & dependent jars into <DITA-OT>/lib.
How to maintain the custom jars of lib folder with DITA-OT version changes? i.e if we migrate or reinstall DITA-OT, how best we can get the custom jars.
I am not sure if I am correct, here is what I am thinking, maintain the custom/dependent jar at repository and checkout. Finally add the custom path to CLASSPATH variable.

Thanks,
Samba.

Radu
Posts: 6918
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA-OT Custom jars

Post by Radu » Thu May 21, 2020 12:07 pm

Hi Samba,

You can contribute the JAR library directly from your DITA OT plugin's plugin.xml:

https://www.dita-ot.org/dev/topics/plugin-javalib.html
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

msambasiva
Posts: 40
Joined: Tue Jul 17, 2018 6:57 am

Re: DITA-OT Custom jars

Post by msambasiva » Tue May 26, 2020 6:39 am

Thanks Radu!
There are some dependent jars like log4j-api-2.13.2.jar, log4j-core-2.13.2.jar,commons-codec-1.10.jar etc which are not part of default DITA-OT installation. Can we use the same extension dita.conductor.lib.import for number of times to include all the dependent jar? Could you suggest best way to manage the jars and dependent jars on re/installation of DITA OT?

Radu
Posts: 6918
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA-OT Custom jars

Post by Radu » Tue May 26, 2020 6:47 am

Hi,

In the plugin.xml you can add references to multiple jar libraries, like for example:

https://github.com/jelovirt/org.lwdita/ ... plugin.xml

This is the portable way of doing things as the plugin will include everything inside.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply