Unable to enable OCR and maven (java)

Asked by tiegs

Hi,

I'm using sikulixapi 1.1.0-SNAPSHOT via maven in a java-project (Java 1.7.0_72) on Windows 7 Enterprise 64Bit.

Tried to enable OCR but failed:
[error] TextRecognizer: init: export tessdata not possible - run setup with option 3
[error] TextRecognizer not working: tessdata stuff not available at: ...

I know I need to install tessdata using skuli-setup. The problem is that the Project is built via Jenkins and the jars are distributed. It is not possible to run the installer on any PC the Software will be distributed to. So I need a way to include tessdata in the project to be able to pack it to the jar. How can i archive this?

The other problem: I'm behind a corporate firewall and therefore unable to download tessdata via sikuli-setup:
[error] Fatal error 001: not able to download: 1.0.1-1.jar
[error] Fatal error 001: not able to download: 1.0.1-5.jar
[debug] Download ended
[error] download not completed successfully
[error] ... terminated abnormally :-(

Thanks for any help.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

Confirmed: The jar you pack in a Maven project does not include the Tessdata stuff. It must be made available with a setup with option 3 on the system you want to run your artefact.

You have 2 options:

--1: instead of using the Maven downloaded sikulixapi.jar, place a sikulixapi.jar created by setup (option 2 and 3) into your local Maven repo and adapt your pom, that this one is included.

--2: on a system run setup with option 3. this should create the folder SikulixTesseract in the SikuliX user environment (see http://www.sikulix.com/quickstart.html#qs3). Add some command script to your Jenkins environment, that installs this folder accordingly on the target system.

about offline setup follow the instructions on the nightly page.

Revision history for this message
tiegs (z-ubuntuone-z) said :
#2

Thanks RaiMan, that solved my question.