mlhartme / sushi

Scripting Library for Java
Apache License 2.0
7 stars 4 forks source link

Current Release

Sushi

Sushi is a scripting library for Java. It provides a simple API for

Note that Sushi releases are not necessarily backward compatible. In particular, if i find a better - but incompatible - api for a given task, I'll change the api. I can't keep old apis just for compatibility (not enough time) and I don't want to have multiple alternative api's if I have a clear preference. But I'll mark incompatible changes by bumping the minor or major version number. (Version number format is major.minor.micro)

Prerequisites

Usage

Sushi is available from Maven Central. To use it in a Maven project, add this dependency:

<dependency>
  <groupId>net.oneandone</groupId>
  <artifactId>sushi</artifactId>
  <version>3.0.0</version>
</dependency>

Optional Dependencies

Sushi itself has several transitive dependencies that are marked optional because not everybody needs them. You have to add them to your project if you want to use the respective sushi feature:

For SshNodes (e.g. world.node("ssh//user@host/my/path")):

  <dependency>
    <groupId>com.jcraft</groupId>
    <artifactId>jsch</artifactId>
    <version>0.1.53</version>
  </dependency>

Additionally, you can add

<dependency>
  <groupId>com.jcraft</groupId>
  <artifactId>jsch.agentproxy.core</artifactId>
  <version>0.0.7</version>
</dependency>
<dependency>
  <groupId>com.jcraft</groupId>
  <artifactId>jsch.agentproxy.jsch</artifactId>
  <version>0.0.7</version>
</dependency>
<dependency>
  <groupId>com.jcraft</groupId>
  <artifactId>jsch.agentproxy.sshagent</artifactId>
  <version>0.0.7</version>
</dependency>
<dependency>
  <groupId>com.jcraft</groupId>
  <artifactId>jsch.agentproxy.usocket-jna</artifactId>
  <version>0.0.7</version>
</dependency>

to make passphrases stored in ssh agent available to Sushi.

For SvnNodes (e.g. world.node("svn:https//host/my/path")):

<dependency>
  <groupId>org.tmatesoft.svnkit</groupId>
  <artifactId>svnkit</artifactId>
  <version>1.8.5</version>
</dependency>

Migrating from Sushi 2.8.x

Tests

mvn clean testonly runs a subset of the available tests. Some of the test need special setup. To run them, adjust test.properties and run mvn test -Dfull

Ssh Setup

Make sure to can ssh to the host specified in test.properties, authenticating with your public key, not a password. If the key is protected with a passphrase, store this passphrase in ~/.ssh/passphrase to make if available to SshNodes.

Webdav Setup

Note: I used https://github.com/adamfisk/LittleProxy for proxy tests.

Ubuntu 10.10 or later

(see also: http://how-to.linuxcareer.com/webdav-server-setup-on-ubuntu-linux)

Mac OS

(tested with Mojave)