Trying to run SikuliX with JUnit

Asked by Robert Grzeskowiak

Hi,

Once I have managed to run SikuliX 1.1.0-Beta4 from OSSH using mvn exec I want to run it using Junit.
There is no problem when running tests using "mvn clean test" command.
The problem appears when trying to run it straight from IDE. I receive an error:
[error] ResourceLoader: Terminating: The jar was not built with setup nor can the libs be exported from classpath!
/C:/Users/robert.grzeskowiak/.m2/repository/com/sikulix/sikulixapi/1.1.0-Beta4-SNAPSHOT/sikulixapi-1.1.0-Beta4-20140726.054020-8.jar

I checked folders sikulixapi and sikulixlibswin and found out differences. There are:
In sikulixapi: sikulixapi-1.1.0-Beta4-20140726.054020-8.jar
In sikulixlibswin: sikulixlibswin-1.1.0-Beta4-20140726.053326-5.jar

Any ideas how to handle that?

Question information

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

the problem is, that in your IDE run (which is it by the way?), the sikulixapi jar is referenced and used with the real timestamps instead of just SNAPSHOT, as it works with my NetBeans setup (which internally simply calls the external Maven)

so in my setup sikulixapi would be:
/C:/Users/robert.grzeskowiak/.m2/repository/com/sikulix/sikulixapi/1.1.0-Beta4-SNAPSHOT/sikulixapi-1.1.0-Beta4-SNAPSHOT.jar

and hence will have the same suffix as sikulixlibswin.

I do not know, why this is so in your installation.
Are you using Maven projects in your IDE?

Revision history for this message
Robert Grzeskowiak (robert-grzeskowiak) said :
#2

I am using IDEA IntelliJ.
I have tried with different maven versions, still the same.
When running from IDE terminal and typing "mvn clean test" it works good (while downloading xml files).
But Run @Test causes the problem.
The timpestamps seem not to be real, since they are from 4 days before.
Take a look on:
https://oss.sonatype.org/content/groups/public/com/sikulix/sikulixapi/1.1.0-Beta4-SNAPSHOT/
and
https://oss.sonatype.org/content/groups/public/com/sikulix/sikulixlibswin/1.1.0-Beta4-SNAPSHOT/

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

The timestamps are ok, this was the last upload I did.

… downloading xml files
is ok. This is needed for Maven, to find out, wether newer snapshots are available.

IDEA IntelliJ.
I have no experiences (using NetBeans)

As already mentioned:
the dependency ref should point to …-SNAPSHOT.jar and not to the timestamped version of the jar.
Why this is so in your case: I cannot tell you.

Can you help with this problem?

Provide an answer of your own, or ask Robert Grzeskowiak for more information if necessary.

To post a message you must log in.