Skip to content

Commit

Permalink
Added <keepRunning> property for clojure:nrepl goal
Browse files Browse the repository at this point in the history
  • Loading branch information
talios committed Sep 12, 2024
1 parent 945c802 commit 045b8d6
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public class ClojureNReplMojo extends AbstractClojureCompilerMojo {
@Parameter(property = "clojure.nrepl.handler")
private String nreplHandler;

@Parameter(property = "clojure.nrepl.keepRunning")
private boolean keepRunning;

@Parameter protected String[] nreplMiddlewares;

@Override
Expand All @@ -54,7 +57,7 @@ public void execute() throws MojoExecutionException {
} else {
sb.append(" :bind \"").append(nreplHost).append("\"");
sb.append(" :port ");
sb.append(Integer.toString(port));
sb.append(port);
}
appendNreplHandler(sb);
if (middlewareConfigured() && noNreplHandlerAvailable()) {
Expand All @@ -65,6 +68,11 @@ public void execute() throws MojoExecutionException {
sb.append(")");
}
sb.append("))");

if (keepRunning) {
sb.append("\n\n(future @(promise))\n\n");
}

String nreplLoader = sb.toString();

if (SystemUtils.IS_OS_WINDOWS) {
Expand Down

0 comments on commit 045b8d6

Please sign in to comment.