Maven plugin fixes

This commit is contained in:
Michael Bogdanov
2015-09-03 15:48:36 +03:00
parent c31f2eecc1
commit 25234f672a
5 changed files with 18 additions and 5 deletions
@@ -2,6 +2,7 @@
[INFO] Compiling Kotlin sources from [/src/main/kotlin]
[INFO] Classes directory is /target/classes
[INFO] Using kotlin annotations from /local-repo/org/jetbrains/kotlin/kotlin-jdk-annotations/0.1-SNAPSHOT/kotlin-jdk-annotations-0.1-SNAPSHOT.jar
[INFO] ModuleName is test-project
[INFO] PERF: INIT: Compiler initialized in LLL ms
[INFO] PERF: ANALYZE: 1 files (2 lines) in LLL ms
[INFO] PERF: GENERATE: 1 files (2 lines) in LLL ms
@@ -73,6 +73,12 @@ public class K2JVMCompileMojo extends KotlinCompileMojoBase<K2JVMCompilerArgumen
@Parameter(defaultValue = "${project.testClasspathElements}", required = true, readonly = true)
protected List<String> testClasspath;
@Parameter(defaultValue = "${project.artifactId}", required = true, readonly = true)
protected String moduleName;
@Parameter(defaultValue = "${project.artifactId}-test", required = true, readonly = true)
protected String testModuleName;
@NotNull
@Override
protected K2JVMCompiler createCompiler() {
@@ -112,6 +118,9 @@ public class K2JVMCompileMojo extends KotlinCompileMojoBase<K2JVMCompilerArgumen
arguments.annotations = getFullAnnotationsPath(getLog(), annotationPaths);
getLog().info("Using kotlin annotations from " + arguments.annotations);
arguments.moduleName = moduleName;
getLog().info("ModuleName is " + moduleName);
try {
Args.parse(arguments, ArrayUtil.toStringArray(args));
}
@@ -87,6 +87,7 @@ public class KotlinTestCompileMojo extends K2JVMCompileMojo {
module = testModule;
classpath = testClasspath;
output = testOutput;
moduleName = testModuleName;
super.configureSpecificCompilerArguments(arguments);
}