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-core</module>
|
||||
<module>tools/kotlin-maven-plugin</module>
|
||||
<module>tools/kotlin-maven-plugin-test</module>
|
||||
<module>tools/kotlin-js-library</module>
|
||||
<module>tools/kotlin-js-tests</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">
|
||||
<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>
|
||||
<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>
|
||||
<dependency>
|
||||
@@ -23,6 +19,11 @@
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-runtime</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -45,14 +46,12 @@
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<!--suppress MavenModelInspection -->
|
||||
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<version>${kotlin.version}</version>
|
||||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<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">
|
||||
<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>
|
||||
<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>
|
||||
<dependency>
|
||||
@@ -23,6 +19,11 @@
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-runtime</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -45,15 +46,12 @@
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<!--suppress MavenModelInspection -->
|
||||
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
||||
<!--suppress MavenModelInspection -->
|
||||
<!--testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory-->
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<version>${kotlin.version}</version>
|
||||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<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">
|
||||
<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>
|
||||
<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>
|
||||
<dependency>
|
||||
@@ -23,6 +19,11 @@
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-runtime</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -45,15 +46,12 @@
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<!--suppress MavenModelInspection -->
|
||||
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
||||
<!--suppress MavenModelInspection -->
|
||||
<!--testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory-->
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<version>${kotlin.version}</version>
|
||||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
@@ -70,11 +68,11 @@
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<inline>false</inline>
|
||||
</configuration>
|
||||
<configuration>
|
||||
<inline>false</inline>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</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>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>${maven.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>${maven.version}</version>
|
||||
@@ -60,55 +60,4 @@
|
||||
|
||||
</plugins>
|
||||
</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>
|
||||
|
||||
@@ -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