Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

How to use with Maven

Raimund Hocke edited this page Nov 7, 2017 · 5 revisions

How to define the dependency to sikulixapi.jar.

This is related to SikuliX 1.1.1+ (not version 2!). SikuliX 1.1.0 is no longer supported - use 1.1.1

This is the base dependency for sikulixapi (always needed)

For the current release version 1.1.1:

<dependency>
  <groupId>com.sikulix</groupId>
  <artifactId>sikulixapi</artifactId>
  <version>1.1.1</version>
</dependency>

If you want to use the latest SNAPSHOT version (related to a nightly build), you need a repository entry:

<repository>
  <id>sonatype-ossrh</id>
  <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>

... and in the above dependency for sikulixapi use:

  <version>1.1.2-SNAPSHOT</version>

Be aware: snapshot versions before 1.1.2 are no longer supported.
The following dependencies should be used as shown (do not change the version info).

Additional dependencies as needed

Since the standard Maven usage does not automatically import transient dependencies (those sikulixapi depends on), you need additional dependencies.

To get the native libraries for the system running on (always needed, system specific):

  • for Windows

      <dependency>
        <groupId>com.sikulix</groupId>
        <artifactId>sikulixlibswin</artifactId>
        <version>1.1.1</version>
      </dependency>
      <dependency>
        <groupId>com.melloware</groupId>
        <artifactId>jintellitype</artifactId>
        <version>1.3.9</version>
      </dependency>
      <dependency>
        <groupId>com.nativelibs4java</groupId>
        <artifactId>bridj</artifactId>
        <version>0.7.0</version>
      </dependency>
    
  • for Mac

      <dependency>
        <groupId>com.sikulix</groupId>
        <artifactId>sikulixlibsmac</artifactId>
        <version>1.1.1</version>
      </dependency>
    
  • for Linux

      <dependency>
        <groupId>com.sikulix</groupId>
        <artifactId>sikulixlibslux</artifactId>
        <version>1.1.1</version>
      </dependency>
    

In the sikulixapi pom you can see a solution, how to select the correct library jar using properties.

If you want to use the VNC solution you need (optional):

<dependency>
  <groupId>com.sikulix</groupId>
  <artifactId>sikulix1tigervnc</artifactId>
  <version>1.1.1</version>
</dependency>

If you want to use the experimental Android solution you need (optional):

<dependency>
  <groupId>com.github.vidstige</groupId>
  <artifactId>jadb</artifactId>
  <version>-v1.0-g94ebf38-23</version>
</dependency>

for this dependency you need an extra repository entry:

jitpack.io https://jitpack.io

For very special cases (when getting related class-not-found-errors): (optional)

<dependency>
  <groupId>commons-cli</groupId>
  <artifactId>commons-cli</artifactId>
  <version>1.2</version>
</dependency>
<dependency>
  <groupId>org.apache.commons</groupId>
  <artifactId>commons-exec</artifactId>
  <version>1.3</version>
</dependency>
<dependency>
  <groupId>commons-net</groupId>
  <artifactId>commons-net</artifactId>
  <version>3.4</version>
</dependency>

You might as well use any other appropriate solution, to solve the transient-dependencies-problem.