Fix kotlin pom.xml
This commit is contained in:
parent
68281fa705
commit
19afd94177
@ -28,9 +28,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
|
||||||
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>kotlin-maven-plugin</artifactId>
|
<artifactId>kotlin-maven-plugin</artifactId>
|
||||||
@ -38,29 +37,51 @@
|
|||||||
<version>${kotlin-maven-plugin.version}</version>
|
<version>${kotlin-maven-plugin.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<configuration>
|
|
||||||
<sourceDirs>
|
|
||||||
<source>src/main/java</source>
|
|
||||||
<source>src/main/kotlin</source>
|
|
||||||
</sourceDirs>
|
|
||||||
</configuration>
|
|
||||||
<id>compile</id>
|
<id>compile</id>
|
||||||
<goals>
|
<goals> <goal>compile</goal> </goals>
|
||||||
<goal>compile</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
|
|
||||||
<execution>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<sourceDirs>
|
<sourceDirs>
|
||||||
<source>src/test/java</source>
|
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
|
||||||
<source>src/test/kotlin</source>
|
<sourceDir>${project.basedir}/src/main/java</sourceDir>
|
||||||
</sourceDirs>
|
</sourceDirs>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
<id>test-compile</id>
|
<id>test-compile</id>
|
||||||
<goals>
|
<goals> <goal>test-compile</goal> </goals>
|
||||||
<goal>test-compile</goal>
|
<configuration>
|
||||||
</goals>
|
<sourceDirs>
|
||||||
|
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
|
||||||
|
<sourceDir>${project.basedir}/src/test/java</sourceDir>
|
||||||
|
</sourceDirs>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.5.1</version>
|
||||||
|
<executions>
|
||||||
|
<!-- Replacing default-compile as it is treated specially by maven -->
|
||||||
|
<execution>
|
||||||
|
<id>default-compile</id>
|
||||||
|
<phase>none</phase>
|
||||||
|
</execution>
|
||||||
|
<!-- Replacing default-testCompile as it is treated specially by maven -->
|
||||||
|
<execution>
|
||||||
|
<id>default-testCompile</id>
|
||||||
|
<phase>none</phase>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>java-compile</id>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals> <goal>compile</goal> </goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>java-test-compile</id>
|
||||||
|
<phase>test-compile</phase>
|
||||||
|
<goals> <goal>testCompile</goal> </goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
@ -69,9 +90,10 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<junit.version>4.12</junit.version>
|
<junit.version>4.12</junit.version>
|
||||||
<kotlin-test-junit.version>1.0.4</kotlin-test-junit.version>
|
<kotlin-maven-plugin.version>1.0.6</kotlin-maven-plugin.version>
|
||||||
<kotlin-stdlib.version>1.0.4</kotlin-stdlib.version>
|
<kotlin-test-junit.version>1.0.6</kotlin-test-junit.version>
|
||||||
<kotlin-maven-plugin.version>1.0.4</kotlin-maven-plugin.version>
|
<kotlin-stdlib.version>1.0.6</kotlin-stdlib.version>
|
||||||
|
<kotlin-maven-plugin.version>1.0.6</kotlin-maven-plugin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -6,12 +6,13 @@ import kotlin.test.assertEquals
|
|||||||
|
|
||||||
|
|
||||||
class KotlinScalaInteroperabilityTest {
|
class KotlinScalaInteroperabilityTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun givenLowercaseString_whenExecuteMethodFromJavaStringUtils_shouldReturnStringUppercase() {
|
fun givenLowercaseString_whenExecuteMethodFromJavaStringUtils_shouldReturnStringUppercase() {
|
||||||
//given
|
//given
|
||||||
val name = "tom"
|
val name = "tom"
|
||||||
|
|
||||||
//when
|
//whene
|
||||||
val res = StringUtils.toUpperCase(name)
|
val res = StringUtils.toUpperCase(name)
|
||||||
|
|
||||||
//then
|
//then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user