BUILD FAILED after running ant integrator file.

76 views
Skip to first unread message

Rohit Ghosh

unread,
Oct 3, 2018, 8:14:10 AM10/3/18
to DITA-OT Users
Hi , I have created a plugin and installed it in the plugin folder. No i am trying to run the integrator.xml  from this command ant -f integrator.xml , is throwing this error:-



BUILD FAILED
C:\dita-ot-3.1.1\integrator.xml:38: taskdef A class needed by class org.dita.dos
t.ant.IntegratorTask cannot be found: org/slf4j/Logger
 using the classloader AntClassLoader[C:\dita-ot-3.1.1\lib\dost.jar;C:\dita-ot-3
.1.1\lib\dost-configuration.jar]

How can I read my own plugin for PDF output?

jcgui...@legal-suite.com

unread,
Oct 3, 2018, 10:55:05 AM10/3/18
to DITA-OT Users
HI Rohit,

If you are using the elovirta plugin please note that it is supposed to work along with dita 3.0 as specified on page 1 of the plugin generator.

I have been facing issues trying to use it along with last dita ot release. ;)

Rohit Ghosh

unread,
Oct 4, 2018, 1:47:05 AM10/4/18
to DITA-OT Users
Yes, apart from elovirta plugin generator , I have created another plugin from here https://www.dita-ot.org/3.0/topics/pdf-customization-example.html. manually. I am using DITA-OT-3.1.1
I am a little confused about the steps. Do I also need to create build.xml file ? My plugin is getting installed successfully but not getting output from my plugin.

Stefan Eike

unread,
Oct 4, 2018, 4:13:28 AM10/4/18
to DITA-OT Users
Maybe you can upload your plugin on Github, so that we can have a look at the code.

Stefan Eike

unread,
Oct 4, 2018, 4:16:04 AM10/4/18
to DITA-OT Users
In the documetion example you have linked, the build script is not called "build.xml" but "integrator.xml". You must not call this script directly, it is part of your plugin. You should integrate your plugin and then call.

dita -i yourfile.ditamap -f your-pdf-transformation-name

your-pdf-transformation-name is defined in "dita.transtype.print"

Rohit Ghosh

unread,
Oct 4, 2018, 4:22:45 AM10/4/18
to DITA-OT Users
Now there is no error in building , but it is still reading the pdf2 by default. How can I make own plugin to read by ant/dita ? I am posting my code here :-
PS:- I have created a new plugin from Jarno's generator.

plugin.xml :-

<?xml version='1.0' encoding='utf-8'?>
<plugin id="com.example.test">
  <feature extension="package.version" value="1.1.0" />
  <require plugin="org.dita.pdf2" />
  <feature extension="dita.conductor.transtype.check" value="com.example.testrohit" />
  <feature extension="dita.transtype.print" value="com.example.testrohit" />
  <feature extension="dita.conductor.target.relative" file="integrator.xml" />
  <feature extension="ant.import" file="build_xml.xml"/>
</plugin>

integrator.xml:-

<?xml version='1.0' encoding='utf-8'?>
<project name="com.example.test">
  <target name="dita2com.example.testrohit.init">
    <property location="${dita.plugin.com.example.test.dir}/cfg" name="customization.dir" />
    <property name="pdf2.i18n.skip" value="true" />
    <property location="${dita.plugin.com.example.test.dir}/xsl/fo/topic2fo_shell_fop.xsl" name="args.xsl.pdf" />
    <property name="args.chapter.layout" value="MINITOC" />
    <property name="args.bookmark.style" value="COLLAPSED" />
    <property name="args.gen.task.lbl" value="YES" />
    <property name="args.fo.include.rellinks" value="none" />
  </target>
  <target depends="dita2com.example.testrohit.init, dita2pdf2" name="dita2com.example.testrohit" />
</project>

Also I have created a new build file :-

buil_xml.xml :-

<?xml version="1.0" encoding="UTF-8" ?>
<project name="com.example.test" default="pdf" basedir=".">
  <property name="dita.dir" location="${basedir}/../../.."/>

  <target name="pdf" description="build PDF">
    <ant antfile="${dita.dir}/build.xml">
      <property name="args.input" location="C:\Users\india\Desktop\ditamaps\mobile-phone\mobilePhone.ditamap"/>
      <property name="transtype" value="pdf"/>
      <property name="output.dir" location="C:\Users\india\Desktop"/>
      <property name="args.gen.task.lbl" value="YES"/>
      <property name="args.rellinks" value="nofamily"/>
    </ant>
  </target>
</project>

After this  I run ant -f integrator.xml  from DITA-OT-3.1.1 dir and building is successful.

Stefan Eike

unread,
Oct 4, 2018, 4:29:03 AM10/4/18
to DITA-OT Users
Please delete your build_xml.xml. You don't need that file.

Then call "dita --install" to integrate your plugin. You should not integrate with ant anymore. Then call "dita -i yourfile.ditamap -f com.example.testrohit" to publish your pdf.

Rohit Ghosh

unread,
Oct 4, 2018, 4:36:34 AM10/4/18
to DITA-OT Users
Thank You so much. This was helpful. :)
Reply all
Reply to author
Forward
0 new messages