Extract kotlin-maven-plugin tests into a separate subproject
Because they need kotlin-runtime to run, which is built by kotlin-maven-plugin
This commit is contained in:
@@ -83,6 +83,7 @@
|
|||||||
<module>tools/kotlin-gradle-plugin</module>
|
<module>tools/kotlin-gradle-plugin</module>
|
||||||
<module>tools/kotlin-gradle-plugin-core</module>
|
<module>tools/kotlin-gradle-plugin-core</module>
|
||||||
<module>tools/kotlin-maven-plugin</module>
|
<module>tools/kotlin-maven-plugin</module>
|
||||||
|
<module>tools/kotlin-maven-plugin-test</module>
|
||||||
<module>tools/kotlin-js-library</module>
|
<module>tools/kotlin-js-library</module>
|
||||||
<module>tools/kotlin-js-tests</module>
|
<module>tools/kotlin-js-tests</module>
|
||||||
<module>tools/kotlin-js-tests-junit</module>
|
<module>tools/kotlin-js-tests-junit</module>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
local-repo
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
<?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">
|
||||||
|
<parent>
|
||||||
|
<artifactId>kotlin-project</artifactId>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<version>0.1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>kotlin-maven-plugin-test</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-maven-plugin</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-runtime</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<!--
|
||||||
|
moved the integration test into a profile so we can disable this
|
||||||
|
for example this integration test doesn't work if offline
|
||||||
|
-->
|
||||||
|
<profile>
|
||||||
|
<id>integrationTest</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-invoker-plugin</artifactId>
|
||||||
|
<version>1.5</version>
|
||||||
|
<configuration>
|
||||||
|
<projectsDirectory>src/it</projectsDirectory>
|
||||||
|
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
|
||||||
|
<pomIncludes>
|
||||||
|
<pomInclude>*/pom.xml</pomInclude>
|
||||||
|
</pomIncludes>
|
||||||
|
<!--This could speed up test by providing local repo as remote repo for test but might be tricky on different OS-->
|
||||||
|
<!--<settingsFile>src/it/settings.xml</settingsFile>-->
|
||||||
|
<localRepositoryPath>local-repo</localRepositoryPath>
|
||||||
|
<postBuildHookScript>verify.bsh</postBuildHookScript>
|
||||||
|
<streamLogs>true</streamLogs>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>integration-test</id>
|
||||||
|
<!--<phase>package</phase>-->
|
||||||
|
<goals>
|
||||||
|
<goal>install</goal>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<!-- allows the integration test to be disabled (for example if you are offline) -->
|
||||||
|
<profile>
|
||||||
|
<id>noTest</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>false</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
</project>
|
||||||
+13
-14
@@ -4,18 +4,14 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>org.jetbrains.kotlin.it</groupId>
|
<parent>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-project</artifactId>
|
||||||
|
<version>0.1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
<artifactId>test-classpath</artifactId>
|
<artifactId>test-classpath</artifactId>
|
||||||
<version>1.0</version>
|
|
||||||
<name>Test Hello World project</name>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
Test the kotlin-maven-plugin:compile goal on test-classpath project.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<kotlin.version>0.1-SNAPSHOT</kotlin.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -23,6 +19,11 @@
|
|||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.9</version>
|
<version>4.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-runtime</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -45,14 +46,12 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
|
|
||||||
<!--suppress MavenModelInspection -->
|
|
||||||
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>kotlin-maven-plugin</artifactId>
|
<artifactId>kotlin-maven-plugin</artifactId>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<version>${kotlin.version}</version>
|
<version>${project.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>compile</id>
|
<id>compile</id>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import java.io.*;
|
||||||
|
|
||||||
|
File file = new File(basedir, "target/test-classpath-0.1-SNAPSHOT.jar");
|
||||||
|
if (!file.exists() || !file.isFile()) {
|
||||||
|
throw new FileNotFoundException("Could not find generated JAR: " + file);
|
||||||
|
}
|
||||||
+13
-15
@@ -4,18 +4,14 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>org.jetbrains.kotlin.it</groupId>
|
<parent>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-project</artifactId>
|
||||||
|
<version>0.1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
<artifactId>test-helloworld</artifactId>
|
<artifactId>test-helloworld</artifactId>
|
||||||
<version>1.0</version>
|
|
||||||
<name>Test Hello World project</name>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
Test the kotlin-maven-plugin:compile goal on HelloWorld project.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<kotlin.version>0.1-SNAPSHOT</kotlin.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -23,6 +19,11 @@
|
|||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.9</version>
|
<version>4.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-runtime</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -45,15 +46,12 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
|
|
||||||
<!--suppress MavenModelInspection -->
|
|
||||||
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
||||||
<!--suppress MavenModelInspection -->
|
|
||||||
<!--testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory-->
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>kotlin-maven-plugin</artifactId>
|
<artifactId>kotlin-maven-plugin</artifactId>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<version>${kotlin.version}</version>
|
<version>${project.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>compile</id>
|
<id>compile</id>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import java.io.*;
|
||||||
|
|
||||||
|
File file = new File(basedir, "target/test-helloworld-0.1-SNAPSHOT.jar");
|
||||||
|
if (!file.exists() || !file.isFile()) {
|
||||||
|
throw new FileNotFoundException("Could not find generated JAR: " + file);
|
||||||
|
}
|
||||||
+17
-19
@@ -4,18 +4,14 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>org.jetbrains.kotlin.it</groupId>
|
<parent>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-project</artifactId>
|
||||||
|
<version>0.1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
<artifactId>test-inlineDisabled</artifactId>
|
<artifactId>test-inlineDisabled</artifactId>
|
||||||
<version>1.0</version>
|
|
||||||
<name>Test Hello World project</name>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
Test the kotlin-maven-plugin:compile goal on HelloWorld project.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<kotlin.version>0.1-SNAPSHOT</kotlin.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -23,6 +19,11 @@
|
|||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.9</version>
|
<version>4.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-runtime</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -45,15 +46,12 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
|
|
||||||
<!--suppress MavenModelInspection -->
|
|
||||||
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
||||||
<!--suppress MavenModelInspection -->
|
|
||||||
<!--testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory-->
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>kotlin-maven-plugin</artifactId>
|
<artifactId>kotlin-maven-plugin</artifactId>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<version>${kotlin.version}</version>
|
<version>${project.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>compile</id>
|
<id>compile</id>
|
||||||
@@ -70,11 +68,11 @@
|
|||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<inline>false</inline>
|
<inline>false</inline>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import java.io.*;
|
||||||
|
|
||||||
|
File file = new File(basedir, "target/test-inlineDisabled-0.1-SNAPSHOT.jar");
|
||||||
|
if (!file.exists() || !file.isFile()) {
|
||||||
|
throw new FileNotFoundException("Could not find generated JAR: " + file);
|
||||||
|
}
|
||||||
@@ -20,12 +20,12 @@
|
|||||||
<packaging>maven-plugin</packaging>
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-core</artifactId>
|
<artifactId>maven-core</artifactId>
|
||||||
<version>${maven.version}</version>
|
<version>${maven.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-plugin-api</artifactId>
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
<version>${maven.version}</version>
|
<version>${maven.version}</version>
|
||||||
@@ -60,55 +60,4 @@
|
|||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<!--
|
|
||||||
moved the integration test into a profile so we can disable this
|
|
||||||
for example this integration test doesn't work if offline
|
|
||||||
-->
|
|
||||||
<profile>
|
|
||||||
<id>integrationTest</id>
|
|
||||||
<activation>
|
|
||||||
<activeByDefault>true</activeByDefault>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-invoker-plugin</artifactId>
|
|
||||||
<version>1.5</version>
|
|
||||||
<configuration>
|
|
||||||
<projectsDirectory>src/it</projectsDirectory>
|
|
||||||
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
|
|
||||||
<pomIncludes>
|
|
||||||
<pomInclude>*/pom.xml</pomInclude>
|
|
||||||
</pomIncludes>
|
|
||||||
<!--This could speed up test by providing local repo as remote repo for test but might be tricky on different OS-->
|
|
||||||
<!--<settingsFile>src/it/settings.xml</settingsFile>-->
|
|
||||||
<localRepositoryPath>local-repo</localRepositoryPath>
|
|
||||||
<postBuildHookScript>verify.bsh</postBuildHookScript>
|
|
||||||
<streamLogs>true</streamLogs>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>integration-test</id>
|
|
||||||
<!--<phase>package</phase>-->
|
|
||||||
<goals>
|
|
||||||
<goal>install</goal>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
<!-- allows the integration test to be disabled (for example if you are offline) -->
|
|
||||||
<profile>
|
|
||||||
<id>noTest</id>
|
|
||||||
<activation>
|
|
||||||
<activeByDefault>false</activeByDefault>
|
|
||||||
</activation>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
import java.io.*;
|
|
||||||
|
|
||||||
File file = new File( basedir, "target/test-classpath-1.0.jar" );
|
|
||||||
if (!file.exists() || !file.isFile())
|
|
||||||
{
|
|
||||||
throw new FileNotFoundException( "Could not find generated JAR: " + file );
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import java.io.*;
|
|
||||||
|
|
||||||
File file = new File( basedir, "target/test-helloworld-1.0.jar" );
|
|
||||||
if (!file.exists() || !file.isFile())
|
|
||||||
{
|
|
||||||
throw new FileNotFoundException( "Could not find generated JAR: " + file );
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import java.io.*;
|
|
||||||
|
|
||||||
File file = new File( basedir, "target/test-inlineDisabled-1.0.jar" );
|
|
||||||
if (!file.exists() || !file.isFile())
|
|
||||||
{
|
|
||||||
throw new FileNotFoundException( "Could not find generated JAR: " + file );
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user