Page 1 of 1

Adding custom library to DITA-OT class path

Posted: Wed Aug 31, 2016 7:56 am
by Patrik
Hi,

I added a java-based preprocessing step to DITA-OT (2.3). Thus, every DITA-OT-transformation needs to have two custom libraries added to the classpath. I've added these in my plugin and in the DITA-OT/build.xml they are listed within <path id="dost.class.path">. So I'd guess I have done this correctly. But when performing any DITA-OT-transformation from oXygen I get a ClassNotFoundException.

When adding my libraries explicitly in the transformation scenario it's working fine, but it's quite uncomfortable having to do this for every new transformation scenario again. Is there any mechanism to have this done only once?

Thanks and regards,
Patrik

Re: Adding custom library to DITA-OT class path

Posted: Wed Aug 31, 2016 9:11 am
by Radu
Hi Patrik,

Unfortunately once the libraries specified via the dita.conductor.lib.import are added to the dost class path they also need to be specified in the classpath used to start the DITA OT publishing process.
Unfortunately right now Oxygen does not automatically update the "Libraries" list by looking at the JAR libraries contributed by plugins.

One modification I made for Oxygen 18.1 one of the library entries added by default to the Libraries list will be this one ${dita.dir.url}/plugins/*/lib/*.jar meaning that if any plugin has a lib directory with some JAR libraries inside it, those libraries will be contributed automatically to the classpath. Another way of fixing this would be for Oxygen to scan all plugin.xml's and pick up the JAR libraries contributed by them. I will look more into this.

Regards,
Radu

Re: Adding custom library to DITA-OT class path

Posted: Fri Oct 28, 2016 10:15 am
by Radu
Hi,

Oxygen 18.1 which we released a couple of weeks ago, should automatically use in the publishing process that it starts, the JAR libraries contributed by each plugin in the default used DITA OT.

Regards,
Radu