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)
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>
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>
mvn clean test
only 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
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.
Note: I used https://github.com/adamfisk/LittleProxy for proxy tests.
(see also: http://how-to.linuxcareer.com/webdav-server-setup-on-ubuntu-linux)
sudo apt-get install apache2
sudo a2enmod dav
sudo a2enmod dav_fs
sudo mkdir /var/www/webdav
sudo chown www-data:www-data /var/www/webdav
sudoedit /etc/apache2/mods-available/dav_fs.conf
DAVLockDB ${APACHE_LOCK_DIR}/DAVLock <Directory "/var/www/webdav"> Dav On Options +Indexes </Directory> Alias /webdav /var/www/webdav
ensure the lock file exists:
sudo touch /var/lock/apache2/DAVLock
sudo chown www-data:www-data /var/lock/apache2/DAVLock
sudo /etc/init.d/apache2 reload
point your browser to http://localhost/webdav
to verify. You should get an empty directory listing
(tested with Mojave)
sudo apachectl start
/etc/apache2/httpd.conf: make sure the following lines are present
In /private/etc/apache2/extra/httpd-dav.conf replace uploads config with
Alias /webdav "/Library/WebServer/WebDAV" <Directory "/Library/WebServer/WebDAV"> Dav On Options +Indexes Require all granted </Directory>
and change the lock file to DavLockDB "/var/webdav/DavLock"
sudo mkdir -p /var/webdav
for lock file
sudo chown -R _www:_www /var/webdav
sudo mkdir -p /Library/WebServer/WebDAV
for data
sudo chown -R _www:_www /Library/WebServer/WebDAV
sudo apachectl graceful
point your browser to http://localhost/webdav
.
trouble shooting