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

More information related to the Maven aspects in this project

RaiMan edited this page Sep 10, 2014 · 1 revision

It is recommended, to have a Maven 3 installation, that is ready to be used from a command line using the command mvn.

When having a Maven aware IDE (NetBeans, Eclipse with plugin, ...) though, a separate Maven installation is not really needed for the basic build steps of SikuliX.

--- Basic compile/package/install for each module

You have 3 options, to selectively run the POM of a specific module alone:

  1. in the root folder run
    mvn -pl <ModuleName> [clean] [compile|package|install]
    where <ModuleName> is the respective folder name
  2. in the module's folder run
    mvn [clean] [compile|package|install]
  3. use the respective build steps in your IDE being in one of the module projects

--- Running the IDE or running scripts ---

In this Maven context the only runnable (means: should be run or makes sense to run) module is IDE (besides Setup with RunSetup), but this is sufficient, to get access to and test every aspect of Sikuli, since you can start the IDE and run scripts directly as well.

Being in module IDE firing the RUN button in an IDE should start the Sikuli IDE. Use the specific run settings of your project, to provide parameters like -r or others.

This Java settings are relevant for running Sikuli IDE from an IDE or using Maven:

  • -Dsikuli.Debug=3 sets a higher debug level, the equivalent of -d 3
  • -Dsikuli.console=false the equivalent of the option -c (script output goes to console)

Debugging should work without problems, when starting the module IDE in debug mode.

The module IDE POM contains the exec-maven-plugin, so to run the Sikuli IDE you can use being in the IDE folder
mvn exec:java -Dsikuli.FromCommandLine -Dexec.args="args for Sikuli"

or this being in the root folder
mvn -pl IDE exec:java -Dsikuli.FromCommandLine -Dexec.args="args for Sikuli"

As it is standard with Maven, all -D parameters go to Java system properties, wheras the content of -Dexec.args string will be given to the args array for the main method of the startup class.