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

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

How to define the dependency to sikulix.jar for a release version like 1.1.1:

This is the base dependency for sikulixapi (always needed):

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

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>${sikulix.libs}</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 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.