Add test to the fix of maven script executor

related to the fix of #KT-58101
This commit is contained in:
Ilya Chernikov
2023-04-24 17:14:35 +02:00
committed by Space Team
parent 66648b36df
commit 5ef0b52ac5
2 changed files with 48 additions and 0 deletions
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>test-executeKotlinScriptInline</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<plugins>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>execute-kotlin-script</id>
<phase>compile</phase>
<goals>
<goal>script</goal>
</goals>
<configuration>
<script>
val f = java.io.File("java")
println("Hello from inline Kotlin script using ${f.name}!")
</script>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,3 @@
source(new File(basedir, "../../../../verify-common.bsh").getAbsolutePath());
assertBuildLogHasLine("Hello from inline Kotlin script using java!")