System.out.println("ccwPluginDir: " + ccwPluginDir);
// this should *always* be a file, *unless* the user is getting nREPL from a clone of its
// project, in which case we need to reach into that project's directory...
ArrayList replAdditions = new ArrayList();
if (ccwPluginDir.isFile()) {
throw new WorkbenchException("Bundle ccw.core is a file. Cannot install nrepl");
} else {
//replAdditions.add(new File(repllib, "src/main/clojure").getAbsolutePath());
//replAdditions.add(new File(repllib, "target/classes").getAbsolutePath());
// Hack, until the project is launched via leiningen instead
File nreplFile = new File(ccwPluginDir, "lib/tools.nrepl.jar");
String nreplPath = nreplFile.getAbsolutePath();
if (!nreplFile.exists()) {
throw new WorkbenchException("nreplFile not found: " + nreplFile);
}
System.out.println("nreplPath for classpath:" + nreplPath);
replAdditions.add(nreplPath);
}
CCWPlugin.log("Adding to project's classpath to support nREPL: " + replAdditions);
classpath.addAll(replAdditions);
} catch (IOException e) {
throw new WorkbenchException("Failed to find nrepl library", e);
}
} else {
System.out.println("Found package clojure.tools.nrepl in the project classpath, won't try to add ccw's nrepl to it then");
}