Question #692968 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692968

    Status: Open => Answered

RaiMan proposed the following answer:
My testcase as Maven setup:
https://www.dropbox.com/s/0v5wj6r4houb5zq/TestAPI.zip?dl=0

This is a simple Java program that uses SikuliX features, that need
OpenCV.

Using this on commandline (being in the TestApi directory):
mvn exec:java -Dsikuli.Debug=3

and having deleted the sikulixapi::2.0.4 branch from the local Maven
repo and the SikulX app-data folder, I get the following output:

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< com.sikulix:TestAPI >-------------------------
[INFO] Building TestAPI 2.0.4
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: 
https://repo.maven.apache.org/maven2/com/sikulix/sikulixapi/2.0.4/sikulixapi-2.0.4.pom
Downloaded from central: 
https://repo.maven.apache.org/maven2/com/sikulix/sikulixapi/2.0.4/sikulixapi-2.0.4.pom
 (9.2 kB at 24 kB/s)
Downloading from central: 
https://repo.maven.apache.org/maven2/com/sikulix/sikulixapi/2.0.4/sikulixapi-2.0.4.jar
Downloaded from central: 
https://repo.maven.apache.org/maven2/com/sikulix/sikulixapi/2.0.4/sikulixapi-2.0.4.jar
 (44 MB at 6.0 MB/s)
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ TestAPI ---
[debug] RunTime:temp folder ok: 
C:\Users\rmhde\AppData\Local\Temp\Sikulix_626803368
Options: *** options dump
Options: testing =
Options: OptionsFile = 
C:\Users\rmhde\AppData\Roaming\Sikulix\SikulixStore\SikulixOptions.txt
Options: *** options dump end
***** show environment for 2.0.4-2020-03-13_17:09 API <<<---
user.home: C:\Users\rmhde
user.dir (work dir): C:\Users\rmhde\IdeaProjects\TestAPI
user.name: rmhde
java.io.tmpdir: C:\Users\rmhde\AppData\Local\Temp
running 64Bit(amd64) on w (10.0) from a jar
java 8 version 1.8 vm 25.265-b01 class 52.0 arch 64
app data folder: C:\Users\rmhde\AppData\Roaming\Sikulix
executing jar: 
C:\Users\rmhde\.m2\repository\com\sikulix\sikulixapi\2.0.4\sikulixapi-2.0.4.jar 
<<<---
*** classpath dump sikulix
*** classpath dump end
***** show environment end
[78 debug] RunTime:loadlib: trying opencv_java342 <<<---
[99 debug] RunTime:libsExport: folder has wrong content: 
C:\Users\rmhde\AppData\Roaming\Sikulix\SikulixLibs (2.0.4 - 202003140801)
[741 debug] RunTime:addToWindowsSystemPath: added to systempath:
C:\Users\rmhde\AppData\Roaming\Sikulix\SikulixLibs
[745 debug] RunTime:checkJavaUsrPath: added to ClassLoader.usrPaths
[753 debug] RunTime:libsExport: folder created: 
C:\Users\rmhde\AppData\Roaming\Sikulix\SikulixLibs (2.0.4 - 202003131709)
[936 debug] RunTime:loadLib: opencv_java342.dll (success)
[945 debug] Finder2: makeMat: INT_RGB (1920x1200)
[991 debug] Finder2: makeMat: 3BYTE_BGR (79x24)
[998 debug] Finder2: doFindImage: start (stdDev: 132,4604 mean: 671,261076)
[1189 debug] Finder2: doFindImage: in original: %39,3367 (?70) 185 msec
[1191 debug] Finder2: doFindImage: end 187 msec
[1279 debug] Finder2: makeMat: INT_RGB (1920x1200)
[1311 debug] Finder2: doFindImage: start (stdDev: 132,4604 mean: 671,261076)
[1490 debug] Finder2: doFindImage: in original: %39,3364 (?70) 176 msec
[1494 debug] Finder2: doFindImage: end 180 msec
[1588 debug] Finder2: makeMat: INT_RGB (1920x1200)
[1608 debug] Finder2: doFindImage: start (stdDev: 132,4604 mean: 671,261076)
[1790 debug] Finder2: doFindImage: in original: %39,3366 (?70) 180 msec
[1793 debug] Finder2: doFindImage: end 183 msec
[1938 debug] Finder2: makeMat: INT_RGB (1920x1200)
[1956 debug] Finder2: doFindImage: start (stdDev: 132,4604 mean: 671,261076)
[2140 debug] Finder2: doFindImage: in original: %39,3366 (?70) 180 msec
[2144 debug] Finder2: doFindImage: end 184 msec
[2268 debug] Finder2: makeMat: INT_RGB (1920x1200)
[2286 debug] Finder2: doFindImage: start (stdDev: 132,4604 mean: 671,261076)
[2471 debug] Finder2: doFindImage: in original: %39,3366 (?70) 179 msec
[2475 debug] Finder2: doFindImage: end 183 msec
[2608 debug] Finder2: makeMat: INT_RGB (1920x1200)
[2628 debug] Finder2: doFindImage: start (stdDev: 132,4604 mean: 671,261076)
[2810 debug] Finder2: doFindImage: in original: %39,3369 (?70) 177 msec
[2814 debug] Finder2: doFindImage: end 181 msec
[2940 debug] Finder2: makeMat: INT_RGB (1920x1200)
[2960 debug] Finder2: doFindImage: start (stdDev: 132,4604 mean: 671,261076)
[3145 debug] Finder2: doFindImage: in original: %39,3366 (?70) 180 msec
[3148 debug] Finder2: doFindImage: end 183 msec
[3209 debug] Region: handleFindFailed: img
[3213 debug] Region: wait: img.png did not appear [3290 msec]
img not found
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.445 s
[INFO] Finished at: 2020-09-22T14:43:10+02:00
[INFO] ------------------------------------------------------------------------

Watch out for the diffs to your case marked at line ends with <<<---

You should simply try to run my example in your Jenkins environment.

if I add this to the end of Run::main:

    ClassLoader cl = Run.class.getClassLoader();
    URL[] urls = ((URLClassLoader) cl).getURLs();
    for (URL url : urls) {
      System.out.println(url.getPath());
    }

I get this additional output:
/C:/Users/rmhde/IdeaProjects/TestAPI/target/classes/
/C:/Users/rmhde/.m2/repository/com/sikulix/sikulixapi/2.0.4/sikulixapi-2.0.4.jar
/C:/Users/rmhde/.m2/repository/com/sikulix/sikulix2tigervnc/1.1.4/sikulix2tigervnc-1.1.4.jar
/C:/Users/rmhde/.m2/repository/commons-cli/commons-cli/1.4/commons-cli-1.4.jar
/C:/Users/rmhde/.m2/repository/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar
/C:/Users/rmhde/.m2/repository/net/java/dev/jna/jna-platform/5.4.0/jna-platform-5.4.0.jar
/C:/Users/rmhde/.m2/repository/net/java/dev/jna/jna/5.4.0/jna-5.4.0.jar
/C:/Users/rmhde/.m2/repository/net/oneandone/reflections8/reflections8/0.11.6/reflections8-0.11.6.jar
/C:/Users/rmhde/.m2/repository/org/javassist/javassist/3.22.0-GA/javassist-3.22.0-GA.jar
/C:/Users/rmhde/.m2/repository/net/sourceforge/tess4j/tess4j/4.4.1/tess4j-4.4.1.jar
/C:/Users/rmhde/.m2/repository/com/github/jai-imageio/jai-imageio-core/1.4.0/jai-imageio-core-1.4.0.jar
/C:/Users/rmhde/.m2/repository/org/ghost4j/ghost4j/1.0.1/ghost4j-1.0.1.jar
/C:/Users/rmhde/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar
/C:/Users/rmhde/.m2/repository/commons-beanutils/commons-beanutils/1.9.2/commons-beanutils-1.9.2.jar
/C:/Users/rmhde/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
/C:/Users/rmhde/.m2/repository/org/apache/xmlgraphics/xmlgraphics-commons/1.4/xmlgraphics-commons-1.4.jar
/C:/Users/rmhde/.m2/repository/com/lowagie/itext/2.1.7/itext-2.1.7.jar
/C:/Users/rmhde/.m2/repository/org/apache/pdfbox/pdfbox/2.0.17/pdfbox-2.0.17.jar
/C:/Users/rmhde/.m2/repository/org/apache/pdfbox/fontbox/2.0.17/fontbox-2.0.17.jar
/C:/Users/rmhde/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
/C:/Users/rmhde/.m2/repository/org/apache/pdfbox/pdfbox-tools/2.0.17/pdfbox-tools-2.0.17.jar
/C:/Users/rmhde/.m2/repository/org/apache/pdfbox/pdfbox-debugger/2.0.17/pdfbox-debugger-2.0.17.jar
/C:/Users/rmhde/.m2/repository/org/apache/pdfbox/jbig2-imageio/3.0.2/jbig2-imageio-3.0.2.jar
/C:/Users/rmhde/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar
/C:/Users/rmhde/.m2/repository/net/sourceforge/lept4j/lept4j/1.12.3/lept4j-1.12.3.jar
/C:/Users/rmhde/.m2/repository/org/jboss/jboss-vfs/3.2.14.Final/jboss-vfs-3.2.14.Final.jar
/C:/Users/rmhde/.m2/repository/org/jboss/logging/jboss-logging/3.1.4.GA/jboss-logging-3.1.4.GA.jar
/C:/Users/rmhde/.m2/repository/org/slf4j/jul-to-slf4j/1.7.28/jul-to-slf4j-1.7.28.jar
/C:/Users/rmhde/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.28/jcl-over-slf4j-1.7.28.jar
/C:/Users/rmhde/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.28/log4j-over-slf4j-1.7.28.jar
/C:/Users/rmhde/.m2/repository/org/slf4j/slf4j-nop/1.7.28/slf4j-nop-1.7.28.jar
/C:/Users/rmhde/.m2/repository/org/slf4j/slf4j-api/1.7.28/slf4j-api-1.7.28.jar

hope it helps to get nerarer to a solution

-- 
You received this question notification because your team Sikuli Drivers
is subscribed to the question.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to