Adding custom library to DITA-OT class path

Patrik
Posts: 240
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Adding custom library to DITA-OT class path

Post by Patrik » Wed Aug 31, 2016 7:56 am

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

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

Re: Adding custom library to DITA-OT class path

Post by Radu » Wed Aug 31, 2016 9:11 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

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

Re: Adding custom library to DITA-OT class path

Post by Radu » Fri Oct 28, 2016 10:15 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply