quarkusio/quarkus · error · MojoExecutionException

Dev mode process did not complete successfully

Error message

Dev mode process did not complete successfully

What it means

During dev mode, DevMojo polls the launched application process. When the process exits, restoreTerminalState() runs and, if the exit code is not among the expected values, MojoExecutionException 'Dev mode process did not complete successfully' is thrown. This means the quarkus:dev JVM terminated abnormally instead of being stopped by the user.

Source

Thrown at devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java:565

        copySurefireVariables();

        try {
            DevModeRunner runner = new DevModeRunner(bootstrapId);
            Map<Path, Long> pomFiles = readPomFileTimestamps(runner);
            Map<Path, Long> additionalWatchedFiles = readAdditionaWatchedFilesTimestampts(watchedFiles);
            runner.run();
            long nextCheck = System.currentTimeMillis() + 100;
            for (;;) {
                //we never suspend after the first run
                suspend = "n";
                long sleep = Math.max(0, nextCheck - System.currentTimeMillis()) + 1;
                Thread.sleep(sleep);
                if (System.currentTimeMillis() > nextCheck) {
                    nextCheck = System.currentTimeMillis() + 100;
                    if (!runner.alive()) {
                        restoreTerminalState();
                        if (!runner.isExpectedExitValue()) {
                            throw new MojoExecutionException("Dev mode process did not complete successfully");
                        }
                        return;
                    }
                    // we need to keep POM files changes separated for reactor distinctions
                    List<String> changedPoms = collectChangeFilesFrom(pomFiles);
                    List<String> changedFiles = collectChangeFilesFrom(additionalWatchedFiles);
                    changedFiles.addAll(changedPoms);
                    if (!changedFiles.isEmpty()) {
                        logChanges(changedFiles);

                        // stop the runner before we build the new one as the debug port being free
                        // is tested when building the runner
                        runner.stop();

                        final DevModeRunner newRunner;
                        try {
                            bootstrapId = handleAutoCompile(changedPoms);
                            newRunner = new DevModeRunner(runner.commandLine.getDebugPort(), bootstrapId, pomFiles.keySet());

View on GitHub (pinned to e1c734241f)

Solutions

  1. Inspect the console output above the error for the actual crash reason (port conflict, config error, OOM).
  2. Free the HTTP port (e.g. quarkus.http.port or kill the process on 8080) and restart.
  3. Fix failing configuration or compilation errors that abort application startup.
  4. If killed externally by CI/containers, adjust signals/exit codes or run dev mode only in interactive sessions.

Example fix

// before
mvn quarkus:dev  # port 8080 already used by a stale process
// after
lsof -ti:8080 | xargs kill -9 && mvn quarkus:dev
Defensive patterns

Strategy: validation

Validate before calling

// check the dev port is free before starting
int port = 8080;
try (ServerSocket s = new ServerSocket(port)) { /* free */ }
catch (IOException e) { throw new IllegalStateException("Port " + port + " in use — kill the stale process first"); }

Try / catch

try {
    mvnQuarkusDev();
} catch (MojoExecutionException e) {
    if (e.getMessage().contains("did not complete successfully")) {
        // inspect console log above for crash cause; fix port/config, then retry
    }
}

Prevention

When it happens

Trigger: The forked dev-mode process crashes on startup or during hot reload (port already in use, compilation error causing early exit, OOM kill), or exits with a non-zero code, and that code is not in the mojo's expectedExitValues.

Common situations: Port 8080 already occupied by another instance; application fails fast due to a bad config property; container/CI killing the process (OOM, SIGTERM with unexpected code); JVM crash (hs_err files); Ctrl-C handled with unexpected exit code on Windows.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/ca87a0ba6abd88c9. Report an issue: GitHub.