Page 1 of 1

Problem running ditaWebhelp.bat

Posted: Tue Mar 13, 2018 9:35 pm
by DrStrangelove
I am trying to run a transformation from the command line following the instructions in https://www.oxygenxml.com/doc/versions/ ... lugin.html but am having a problem.

I went to my Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic folder, copied and edited ditaWebhelp.bat to be as follows:

Code: Select all

set WEBHELP_JAVA="C:\jdk1.8\bin\java.exe"
set DITA_OT_INSTALL_DIR=%~dp0\..\..
set TRANSTYPE=webhelp
set DITA_MAP_BASE_DIR="C:\DitaContent\DITA-Project\my-helpsystem"
set DITAMAP_FILE=myplatform.ditamap
set DITAVAL_FILE=myapp123.ditaval
set DITAVAL_DIR="C:\DitaContent\DITA-Project\my-helpsystem"

%WEBHELP_JAVA%^
-Xmx512m^
-classpath^
"%DITA_OT_INSTALL_DIR%\tools\ant\lib\ant-launcher.jar;%DITA_OT_INSTALL_DIR%\lib\ant-launcher.jar"^
"-Dant.home=%DITA_OT_INSTALL_DIR%\tools\ant" org.apache.tools.ant.launch.Launcher^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.webhelp.classic\lib\xercesPatches.jar"^
-lib "%DITA_OT_INSTALL_DIR%"^
-lib "%DITA_OT_INSTALL_DIR%\lib"^
-lib "%DITA_OT_INSTALL_DIR%\lib\saxon"^
-lib "%DITA_OT_INSTALL_DIR%\plugins\com.oxygenxml.highlight\lib\xslthl-2.1.1.jar"^
-f "%DITA_OT_INSTALL_DIR%\build.xml"^
"-Dtranstype=%TRANSTYPE%"^
"-Dbasedir=%DITA_MAP_BASE_DIR%"^
"-Doutput.dir=C:\Users\myname\DITA-output\testCommandLineOutput"^
"-Ddita.temp.dir=%DITA_MAP_BASE_DIR%\temp\%TRANSTYPE%"^
"-Dargs.hide.parent.link=no"^
"-Dargs.filter=%DITAVAL_DIR%\%DITAVAL_FILE%"^
"-Ddita.input.valfile=%DITAVAL_DIR%\%DITAVAL_FILE%"^
"-Ddita.dir=%DITA_OT_INSTALL_DIR%"^
"-Dargs.xhtml.classattr=yes"^
"-Dargs.input=%DITA_MAP_BASE_DIR%\%DITAMAP_FILE%"^
"-Dwebhelp.skin.css=%DITA_MAP_BASE_DIR%\TESTmyapp.css"^
"-DbaseJVMArgLine=-Xmx384m"
I opened a command window and executed the above, but got the following:

Code: Select all

"C:\jdk1.8\bin\java.exe" -Xmx512m 
-classpath "C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\\..\..\tools\ant\lib\ant-launcher.jar;C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\\..\..\lib\ant-launcher.jar"
"-Dant.home=C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\\..\..\tools\ant" org.apache.tools.ant.launch.Launcher
-lib "C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\\..\..\plugins\com.oxygenxml.webhelp.classic\lib\xercesPatches.jar"
-lib "C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\\..\.."
-lib "C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\\..\..\lib"
-lib "C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\\..\..\lib\saxon"
-lib "C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\\..\..\plugins\com.oxygenxml.highlight\lib\xslthl-2.1.1.jar"
-f "C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\\..\..\build.xml"
"-Dtranstype=webhelp"
"-Dbasedir="C:\DitaContent\DITA-Project\my-helpsystem""
"-Doutput.dir=C:\Users\myname\DITA-output\testCommandLineOutput"
"-Ddita.temp.dir="C:\DitaContent\DITA-Project\my-helpsystem"\temp\webhelp"
"-Dargs.hide.parent.link=no"
"-Dargs.filter="C:\DitaContent\DITA-Project\my-helpsystem"\myapp123.ditaval"
"-Ddita.input.valfile="C:\DitaContent\DITA-Project\my-helpsystem"\myapp123.ditaval"
"-Ddita.dir=C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\\..\.."
"-Dargs.xhtml.classattr=yes"
"-Dargs.input="C:\DitaContent\DITA-Project\my-helpsystem"\myplatform.ditamap"
"-Dwebhelp.skin.css="C:\DitaContent\DITA-Project\my-helpsystem"\TESTmyapp.css"
"-DbaseJVMArgLine=-Xmx384m
"
Buildfile: C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\build.xml
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.

init:
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.

webhelp-build-init:

BUILD FAILED
C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\build.xml:45: The following error occurred while execut
ing this line:
C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\build_dita.xml:28
: Problem: failed to create task or type if
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.


Total time: 0 seconds
What is wrong? Line 28 of build_dita.xml is :

Code: Select all

<if>
.

Thanks in advance.

Re: Problem running ditaWebhelp.bat

Posted: Wed Mar 14, 2018 6:11 pm
by DrStrangelove
I added this line to my bat file:

Code: Select all

 -lib "%DITA_OT_INSTALL_DIR%\plugins\com.elovirta.ooxml\lib\ant-contrib-0.6.jar"^
but now I am getting this error:

Code: Select all

check-license:
[echo] Using directory C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhe
lp.classic/lib

BUILD FAILED
C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\build.xml:45: The following error occurred while execut
ing this line:
C:\Program Files\Oxygen XML Author 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.webhelp.classic\build_common.xml:
354: The WebHelp Plugin does not contain all jar files. Please contact support@oxygenxml.com for more details.

Re: Problem running ditaWebhelp.bat

Posted: Thu Mar 15, 2018 11:05 am
by alin
Hello,

The WebHelp bundled in oXygen was only intended to be used from oXygen and not from the command line. This is a lightweight WebHelp distribution as it is missing some JAR files that are already found in the oXygen's core.

In conclusion, if you want to trigger the WebHelp transformation from the command line you should use this WebHelp distribution: https://www.oxygenxml.com/xml_webhelp.html
Please note that the oXygen's license key is not compatible with the above WebHelp distribution and you would need an Oxygen XML WebHelp
Process-based license.

You can read more in our User Guide about the steps you need to perform in order to automate the publishing process using the WebHelp plugin: https://www.oxygenxml.com/doc/versions/ ... lugin.html

Regards,
Alin