look for dependencies in /usr/share/java

store command history in ~/.hsscript_history
This commit is contained in:
Peter Hormanns 2014-09-05 12:58:51 +02:00
parent 67674f2535
commit 612a6f5cf3
8 changed files with 17 additions and 11 deletions

View File

@ -3,10 +3,10 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="resource"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="lib" path="lib/commons-cli-1.2.jar"/>
<classpathentry kind="lib" path="lib/xmlrpc-client-3.1.jar"/>
<classpathentry kind="lib" path="lib/xmlrpc-common-3.1.jar"/>
<classpathentry kind="lib" path="lib/ws-commons-util-1.0.1.jar"/>
<classpathentry kind="lib" path="lib/jline-1.0.jar"/>
<classpathentry kind="lib" path="/usr/share/java/commons-cli.jar"/>
<classpathentry kind="lib" path="/usr/share/java/ws-commons-util.jar"/>
<classpathentry kind="lib" path="/usr/share/java/jline.jar"/>
<classpathentry kind="lib" path="/usr/share/java/xmlrpc-client.jar"/>
<classpathentry kind="lib" path="/usr/share/java/xmlrpc-common.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -2,7 +2,7 @@
<project name="hsarweb" default="jar">
<property name="build.home" value="${basedir}/build" />
<property name="lib.home" value="${basedir}/lib" />
<property name="lib.home" value="/usr/share/java" />
<property name="conf.home" value="${basedir}/conf" />
<property name="src.home" value="${basedir}/src" />
<property name="resource.home" value="${basedir}/resource" />
@ -18,7 +18,11 @@
<path id="cp">
<fileset dir="${lib.home}">
<include name="**/*.jar"/>
<include name="jline.jar"/>
<include name="ws-commons-util.jar"/>
<include name="xmlrpc-client.jar"/>
<include name="xmlrpc-common.jar"/>
<include name="commons-cli.jar"/>
</fileset>
</path>
@ -34,7 +38,7 @@
<jar destfile="build/hsscript.jar" basedir="build/cls">
<manifest>
<attribute name="Main-Class" value="de.hsadmin.jscli.Main"/>
<attribute name="Class-Path" value="lib/commons-cli-1.2.jar lib/jline-1.0.jar lib/ws-commons-util-1.0.1.jar lib/xmlrpc-client-3.1.jar lib/xmlrpc-common-3.1.jar"/>
<attribute name="Class-Path" value="/usr/share/java/commons-cli.jar /usr/share/java/jline.jar /usr/share/java/ws-commons-util.jar /usr/share/java/xmlrpc-client.jar /usr/share/java/xmlrpc-common.jar"/>
</manifest>
</jar>
</target>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,11 +1,12 @@
package de.hsadmin.jscli.console;
import java.io.File;
import java.io.IOException;
import de.hsadmin.jscli.exception.JSCliException;
import jline.ConsoleReader;
import jline.SimpleCompletor;
import jline.History;
import jline.SimpleCompletor;
import de.hsadmin.jscli.exception.JSCliException;
public class ConsoleWrapper implements PasswordReader {
@ -17,7 +18,8 @@ public class ConsoleWrapper implements PasswordReader {
try {
cons = new ConsoleReader();
cons.setDefaultPrompt(prompt);
cons.setHistory(new History());
final String userHome = System.getProperty("user.home");
cons.setHistory(new History(new File(userHome + "/.hsscript_history")));
} catch (IOException e) {
throw new JSCliException(e);
}