From 2d03a5a106eac8354e986396b41c904cb2429b0b Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Tue, 17 May 2016 17:55:02 +0300 Subject: [PATCH] Maven: add maven plugin multimodule test --- .../src/it/test-multimodule/pom.xml | 49 +++++++++++++++++++ .../src/it/test-multimodule/sub/pom.xml | 36 ++++++++++++++ .../main/kotlin/org/jetbrains/HelloWorld.kt | 9 ++++ .../src/it/test-multimodule/verify.bsh | 8 +++ 4 files changed, 102 insertions(+) create mode 100644 libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/pom.xml create mode 100644 libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/sub/pom.xml create mode 100644 libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/sub/src/main/kotlin/org/jetbrains/HelloWorld.kt create mode 100644 libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/verify.bsh diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/pom.xml b/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/pom.xml new file mode 100644 index 00000000000..053bd4273ce --- /dev/null +++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + + + org.jetbrains.kotlin + kotlin-project + 1.1-SNAPSHOT + ../../pom.xml + + + test-multimodule-root + pom + + + + org.jetbrains.kotlin + kotlin-stdlib + ${project.version} + + + + + sub + + + + ${project.basedir}/src/main/kotlin + + + kotlin-maven-plugin + org.jetbrains.kotlin + ${project.version} + + + compile + process-sources + + compile + + + + + + + + \ No newline at end of file diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/sub/pom.xml b/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/sub/pom.xml new file mode 100644 index 00000000000..e0288c812a6 --- /dev/null +++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/sub/pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + + org.jetbrains.kotlin + test-multimodule-root + 1.1-SNAPSHOT + ../pom.xml + + + test-multimodule-sub + + + ${project.basedir}/src/main/kotlin + + + kotlin-maven-plugin + org.jetbrains.kotlin + ${project.version} + + + compile + process-sources + + compile + + + + + + + + diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/sub/src/main/kotlin/org/jetbrains/HelloWorld.kt b/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/sub/src/main/kotlin/org/jetbrains/HelloWorld.kt new file mode 100644 index 00000000000..bc4fbf7504e --- /dev/null +++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/sub/src/main/kotlin/org/jetbrains/HelloWorld.kt @@ -0,0 +1,9 @@ +package org.jetbrains + +fun main(args : Array) { + System.out?.println(getGreeting()) +} + +fun getGreeting() : String { + return "Hello, World!" +} \ No newline at end of file diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/verify.bsh b/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/verify.bsh new file mode 100644 index 00000000000..0762027c38b --- /dev/null +++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-multimodule/verify.bsh @@ -0,0 +1,8 @@ +source(new File(basedir, "../../../verify-common.bsh").getAbsolutePath()); + +assertBuildLogHasLineThatContains("kotlin-maven-plugin"); + +File classFile = new File(basedir, "sub/target/classes/org/jetbrains/HelloWorldKt.class"); +if (!classFile.exists()) { + throw new FileNotFoundException("Could not find generated class file: " + classFile); +} \ No newline at end of file