diff --git a/build.gradle b/build.gradle index 297953f9..f3e997aa 100644 --- a/build.gradle +++ b/build.gradle @@ -21,6 +21,11 @@ allprojects { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } + + repositories { + mavenCentral() + jcenter() + } } version = new Date().format("yyyyMMdd") @@ -37,11 +42,6 @@ sourceSets { } } -repositories { - mavenCentral() - jcenter() -} - configurations { // Wrapping implementation because it does not allow access to its files // (i.e. cannot be resolved) @@ -68,7 +68,6 @@ def rhinoJar = configurations.library.files.find { jar -> jar.name.startsWith('rhino') } - startScripts { applicationName = 'helma' classpath = files('../launcher.jar') diff --git a/modules/helma/Ssh.js b/modules/helma/Ssh.js index 875dcecf..76d47966 100644 --- a/modules/helma/Ssh.js +++ b/modules/helma/Ssh.js @@ -18,20 +18,20 @@ /** * @fileoverview Fields and methods of the helma.Ssh class. *

- * To use this optional module, its repository needs to be added to the + * To use this optional module, its repository needs to be added to the * application, for example by calling app.addRepository('modules/helma/Ssh.js') */ // take care of any dependencies app.addRepository('modules/helma/File.js'); -app.addRepository('modules/helma/ganymed-ssh2.jar'); +app.addRepository('modules/helma/ganymed-ssh2-build208.jar'); // define the helma namespace, if not existing if (!global.helma) { global.helma = {}; } -/** +/** * Creates a new instance of helma.Ssh * @class This class provides methods for connecting to a remote * server via secure shell (ssh) and copying files from/to a remote @@ -43,7 +43,7 @@ if (!global.helma) { * file. This argument is optional. * @constructor * @returns A newly created instance of helma.Ssh - * @author Robert Gaggl + * @author Robert Gaggl */ helma.Ssh = function(server, hosts) { var SSHPKG = Packages.ch.ethz.ssh2; @@ -61,11 +61,11 @@ helma.Ssh = function(server, hosts) { } catch (e) { if (e instanceof TypeError == false) throw(e); - throw("helma.Ssh needs " + SSHPKGNAME + + throw("helma.Ssh needs " + SSHPKGNAME + " in lib/ext or application directory " + "[" + SSHPKGURL + "]"); } - + /** * A simple verifier for verifying host keys * @private @@ -96,7 +96,7 @@ helma.Ssh = function(server, hosts) { return; } }; - + /** * Converts the argument into an instance of java.io.File * @param {helma.File|java.io.File|String} file Either a file @@ -131,7 +131,7 @@ helma.Ssh = function(server, hosts) { } return false; }; - + /** * Private helper method for debugging output using app.logger * @param {String} methodName The name of the method @@ -175,7 +175,7 @@ helma.Ssh = function(server, hosts) { } return false; }; - + /** * Connects to a remote host using plain username/password authentication. * @param {String} username The username @@ -217,7 +217,7 @@ helma.Ssh = function(server, hosts) { } return false; }; - + /** * Disconnects this client from the remote server. */ @@ -325,7 +325,7 @@ helma.Ssh = function(server, hosts) { } } }; - + /** * Toggles paranoid mode. If set to true this client tries to * verify the host key against the its list of known hosts @@ -346,7 +346,7 @@ helma.Ssh = function(server, hosts) { this.isParanoid = function() { return paranoid; }; - + /** * main constructor body */ diff --git a/modules/helma/build.gradle b/modules/helma/build.gradle new file mode 100644 index 00000000..bb827dd3 --- /dev/null +++ b/modules/helma/build.gradle @@ -0,0 +1,8 @@ +dependencies { + runtime 'ch.ethz.ganymed:ganymed-ssh2:build208' +} + +task deps(type: Copy) { + from sourceSets.main.runtimeClasspath + into '.' +} diff --git a/modules/helma/ganymed-ssh2.jar b/modules/helma/ganymed-ssh2-build208.jar similarity index 100% rename from modules/helma/ganymed-ssh2.jar rename to modules/helma/ganymed-ssh2-build208.jar diff --git a/settings.gradle b/settings.gradle index 53c80aac..bf90e809 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,3 +7,4 @@ org.apache.tools.ant.DirectoryScanner.removeDefaultExclude('**/.git/**') org.apache.tools.ant.DirectoryScanner.removeDefaultExclude('**/.gitignore') include 'launcher' +include 'modules:helma'