added workaround to maven compiler bug; we may want to throw an exception though if its really a problem
This commit is contained in:
@@ -60,9 +60,17 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments, K2JVMComp
|
|||||||
CompilerSpecialMode mode = parseCompilerSpecialMode(arguments);
|
CompilerSpecialMode mode = parseCompilerSpecialMode(arguments);
|
||||||
File[] altHeadersClasspath;
|
File[] altHeadersClasspath;
|
||||||
if (mode.includeAltHeaders()) {
|
if (mode.includeAltHeaders()) {
|
||||||
File[] defaultAltHeadersPathArray = {PathUtil.getAltHeadersPath()};
|
File path = PathUtil.getAltHeadersPath();
|
||||||
|
File[] defaultAltHeadersPathArray;
|
||||||
|
if (path != null) {
|
||||||
|
defaultAltHeadersPathArray = new File[] {path};
|
||||||
|
} else {
|
||||||
|
// TODO should we throw an exception here instead?
|
||||||
|
defaultAltHeadersPathArray = new File[0];
|
||||||
|
}
|
||||||
if (arguments.altHeaders != null) {
|
if (arguments.altHeaders != null) {
|
||||||
altHeadersClasspath = ArrayUtil.mergeArrays(pathsToFiles(arguments.altHeaders), defaultAltHeadersPathArray);
|
File[] files = pathsToFiles(arguments.altHeaders);
|
||||||
|
altHeadersClasspath = ArrayUtil.mergeArrays(files, defaultAltHeadersPathArray);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
altHeadersClasspath = defaultAltHeadersPathArray;
|
altHeadersClasspath = defaultAltHeadersPathArray;
|
||||||
|
|||||||
Reference in New Issue
Block a user