Skip to content

"javac returned nonzero exit code" error with no stacktrace or details in SBT 0.13.8+ #2256

@JoshRosen

Description

@JoshRosen

Consider the following invalid javacOptions config:

scalacOptions ++= Seq("-target:jvm-1.6"),
javacOptions ++= Seq("-source", "1.7", "-target", "1.6"),

With SBT 0.13.7, this results in the following error message:

[error] javac: source release 1.7 requires target release 1.7
[error] (compile:compile) javac returned nonzero exit code

In SBT 0.13.8+, on the other hand, the error details are missing, making this hard to debug:

[error] (compile:compileIncremental) javac returned nonzero exit code

I think that SBT's handling of javac error output must have changed in 0.13.8 because there are reports from other users that describe similar symptoms:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions