added run-target for ant (needed for NetBeans4)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@274 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 20 years ago
parent a2e5018427
commit beb652847e

@ -327,4 +327,16 @@
</delete>
</target>
<!-- run YaCy (needed for NetBeans4) -->
<target name="run" description="run YaCy">
<java classname="yacy">
<classpath>
<pathelement location="${build}"/>
<pathelement location="${lib}/commons-collections.jar" />
<pathelement location="${lib}/commons-pool-1.2.jar" />
</classpath>
<arg line="-start /Users/admin/dev/yacy/trunk"/>
</java>
</target>
</project>

@ -157,7 +157,7 @@ public final class serverLog {
// loading the logger configuration from file
LogManager logManager = LogManager.getLogManager();
logManager.readConfiguration(new FileInputStream(new File(homePath, "yacy.logging")));
// creating the logging directory
File log = new File("./log/");
if(!log.canRead()) log.mkdir();

@ -127,7 +127,12 @@ public final class yacy {
}
// setting up logging
serverLog.configureLogging(homePath);
try {
serverLog.configureLogging(homePath);
} catch (IOException e) {
System.out.println("could not find logging properties in homePath=" + homePath);
e.printStackTrace();
}
serverLog.logSystem("STARTUP", copyright);
serverLog.logSystem("STARTUP", hline);
@ -570,6 +575,8 @@ public final class yacy {
// application wrapper
public static void main(String args[]) {
String applicationRoot = System.getProperty("user.dir");
System.out.println("args.length=" + args.length);
System.out.print("args=["); for (int i = 0; i < args.length; i++) System.out.print(args[i] + ", "); System.out.println("]");
if ((args.length >= 1) && ((args[0].equals("-startup")) || (args[0].equals("-start")))) {
// normal start-up of yacy
if (args.length == 2) applicationRoot= args[1];

Loading…
Cancel
Save