Issue with PSC in Observer.java trying to build SikuliX1-2.0.5-final

Asked by Roger F Borrello Jr

I am not 100% sure I am building correctly, but I was running "mvn compile" from the SikuliX1-2.0.5-final directory. It results in:

rfb@rfb:~/projects/SikuliX1-2.0.5-final$ mvn compile
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] SikuliX API [jar]
[INFO] SikuliX IDE [jar]
[INFO] sikulix [pom]
[INFO]
[INFO] -----------------------< com.sikulix:sikulixapi >-----------------------
[INFO] Building SikuliX API 2.0.5 [1/3]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ sikulixapi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 76 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ sikulixapi ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 211 source files to /home/rfb/projects/SikuliX1-2.0.5-final/API/target/classes
[INFO] /home/rfb/projects/SikuliX1-2.0.5-final/API/src/main/java/org/sikuli/script/Env.java: Some input files use or override a deprecated API.
[INFO] /home/rfb/projects/SikuliX1-2.0.5-final/API/src/main/java/org/sikuli/script/Env.java: Recompile with -Xlint:deprecation for details.
[INFO] /home/rfb/projects/SikuliX1-2.0.5-final/API/src/main/java/org/sikuli/script/Region.java: Some input files use unchecked or unsafe operations.
[INFO] /home/rfb/projects/SikuliX1-2.0.5-final/API/src/main/java/org/sikuli/script/Region.java: Recompile with -Xlint:unchecked for details.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/rfb/projects/SikuliX1-2.0.5-final/API/src/main/java/org/sikuli/script/support/Observer.java:[125,26] incompatible types: PSC cannot be converted to int
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for sikulix 2.0.5:
[INFO]
[INFO] SikuliX API ........................................ FAILURE [ 3.602 s]
[INFO] SikuliX IDE ........................................ SKIPPED
[INFO] sikulix ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.736 s
[INFO] Finished at: 2021-07-05T18:44:56-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sikulixapi: Compilation failure
[ERROR] /home/rfb/projects/SikuliX1-2.0.5-final/API/src/main/java/org/sikuli/script/support/Observer.java:[125,26] incompatible types: PSC cannot be converted to int
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Perhaps I missed some initial setup, but I cannot find instructions for the source build.

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
RaiMan (raimund-hocke) said :
#1

I had no problems:

- downloaded a fresh copy of the sources from here:
https://github.com/RaiMan/SikuliX1/archive/refs/tags/2.0.5-final.zip

- in the folder
SikuliX1-2.0.5-final

- ran
mvn clean compile (running on Java 11)

no errors.

Revision history for this message
Roger F Borrello Jr (mydoll) said :
#2

Any chance you could make available the "catch" file contents after running: mvn -X -l catch clean compile

That would probably divulge what I am missing from my environment. I have never performed a maven build, and your environment may have additional configuration/content I am missing.

Revision history for this message
Best RaiMan (raimund-hocke) said :
#3

it simply does not compile with Java 8.

Use Java 11 and it works.

Revision history for this message
Roger F Borrello Jr (mydoll) said :
#4

Thanks RaiMan, that solved my question.

Revision history for this message
Roger F Borrello Jr (mydoll) said :
#5

Thanks. It did.