look for dependencies in /usr/share/java
store command history in ~/.hsscript_history
This commit is contained in:
parent
67674f2535
commit
612a6f5cf3
@ -3,10 +3,10 @@
|
|||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="src" path="resource"/>
|
<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="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="/usr/share/java/commons-cli.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/xmlrpc-client-3.1.jar"/>
|
<classpathentry kind="lib" path="/usr/share/java/ws-commons-util.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/xmlrpc-common-3.1.jar"/>
|
<classpathentry kind="lib" path="/usr/share/java/jline.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/ws-commons-util-1.0.1.jar"/>
|
<classpathentry kind="lib" path="/usr/share/java/xmlrpc-client.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/jline-1.0.jar"/>
|
<classpathentry kind="lib" path="/usr/share/java/xmlrpc-common.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<project name="hsarweb" default="jar">
|
<project name="hsarweb" default="jar">
|
||||||
|
|
||||||
<property name="build.home" value="${basedir}/build" />
|
<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="conf.home" value="${basedir}/conf" />
|
||||||
<property name="src.home" value="${basedir}/src" />
|
<property name="src.home" value="${basedir}/src" />
|
||||||
<property name="resource.home" value="${basedir}/resource" />
|
<property name="resource.home" value="${basedir}/resource" />
|
||||||
@ -18,7 +18,11 @@
|
|||||||
|
|
||||||
<path id="cp">
|
<path id="cp">
|
||||||
<fileset dir="${lib.home}">
|
<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>
|
</fileset>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
@ -34,7 +38,7 @@
|
|||||||
<jar destfile="build/hsscript.jar" basedir="build/cls">
|
<jar destfile="build/hsscript.jar" basedir="build/cls">
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Main-Class" value="de.hsadmin.jscli.Main"/>
|
<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>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,11 +1,12 @@
|
|||||||
package de.hsadmin.jscli.console;
|
package de.hsadmin.jscli.console;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import de.hsadmin.jscli.exception.JSCliException;
|
|
||||||
import jline.ConsoleReader;
|
import jline.ConsoleReader;
|
||||||
import jline.SimpleCompletor;
|
|
||||||
import jline.History;
|
import jline.History;
|
||||||
|
import jline.SimpleCompletor;
|
||||||
|
import de.hsadmin.jscli.exception.JSCliException;
|
||||||
|
|
||||||
public class ConsoleWrapper implements PasswordReader {
|
public class ConsoleWrapper implements PasswordReader {
|
||||||
|
|
||||||
@ -17,7 +18,8 @@ public class ConsoleWrapper implements PasswordReader {
|
|||||||
try {
|
try {
|
||||||
cons = new ConsoleReader();
|
cons = new ConsoleReader();
|
||||||
cons.setDefaultPrompt(prompt);
|
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) {
|
} catch (IOException e) {
|
||||||
throw new JSCliException(e);
|
throw new JSCliException(e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user