added workaround to maven compiler bug; we may want to throw an exception though if its really a problem

This commit is contained in:
James Strachan
2012-05-18 19:50:27 +01:00
parent 06f8e27d78
commit cf6622b4fa
@@ -60,9 +60,17 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments, K2JVMComp
CompilerSpecialMode mode = parseCompilerSpecialMode(arguments);
File[] altHeadersClasspath;
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) {
altHeadersClasspath = ArrayUtil.mergeArrays(pathsToFiles(arguments.altHeaders), defaultAltHeadersPathArray);
File[] files = pathsToFiles(arguments.altHeaders);
altHeadersClasspath = ArrayUtil.mergeArrays(files, defaultAltHeadersPathArray);
}
else {
altHeadersClasspath = defaultAltHeadersPathArray;