Fix Maven build due to recent changes to CLI arguments

This commit is contained in:
Alexander Udalov
2014-07-24 20:04:47 +04:00
parent 3a59465f29
commit 485cc906a4
8 changed files with 13 additions and 30 deletions
@@ -160,10 +160,8 @@ public class K2JSCompilerMojo extends KotlinCompileMojo {
k2jsArgs.verbose = true;
}
List<String> sources = getSources();
if (sources.size() > 0) {
k2jsArgs.sourceFiles = sources.toArray(new String[sources.size()]);
}
getLog().info("Compiling Kotlin src from " + Arrays.asList(k2jsArgs.sourceFiles) + " to JavaScript at: " + outputFile);
k2jsArgs.freeArgs.addAll(sources);
getLog().info("Compiling Kotlin src from " + sources + " to JavaScript at: " + outputFile);
}
}
@@ -293,11 +293,11 @@ public abstract class KotlinCompileMojoBase extends AbstractMojo {
arguments.module = module;
}
else {
if (sources.size() <= 0)
if (sources.isEmpty())
throw new MojoExecutionException("No source roots to compile");
arguments.src = join(sources, File.pathSeparator);
log.info("Compiling Kotlin sources from " + arguments.src);
arguments.freeArgs.addAll(sources);
log.info("Compiling Kotlin sources from " + sources);
// TODO: Move it compiler
classpathList.addAll(sources);