Summary: | JDTCompilertAdapter doesn't throw BuildException on compile error | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | bittner |
Version: | 2.0 | ||
Target Milestone: | 2.1 M2 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Olivier Thomann
2002-09-26 09:46:51 EDT
We always return true from the execute method of the JDTCompilerAdapter. We should not call directly the main method of the batch compiler, but rather create a new instance and call compile(String[]) which returns a boolean. It should be fairly simple to fix this issue. If the compilation fails, return false, otherwise return true. Using the compile method of the batch compiler fixed the problem. Wait for approval to release. Does running the default javac task (using JDK javac) provide such a behavior ? If so, then the proposal sounds good to me, please go ahead and release the fix. Yes, javac uses a method that returns a boolean according to the result of the compilation. Then ANT is using this value to report whether or not the build was successful. Should I release in 2.0.2 stream as well? Fixed and released in 2.1 stream. Verified. |