30d6af7aae
#KT-11916 fixed
To use the IC either:
1. set the `kotlin.compiler.incremental` property to `true` in a pom.xml:
```
<properties>
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
</properties>
```
2. pass the `kotlin.compiler.incremental` property in a command line:
```
mvn install -Dkotlin.compiler.incremental=true
```
When IC is on Kotlin plugin is expected to print the warning in the log:
```
Using experimental Kotlin incremental compilation
```
After each call an incremental compiler will also log how many files it has compiled:
```
Compiled %SOME_NUMBER% Kotlin files using incremental compiler
```
Note that the first build will be non-incremental.
For more diagnostic information (such as an exact list of compiled files) use the `kotlin.compiler.incremental.log.level` system property:
```
mvn install -Dkotlin.compiler.incremental=true -Dkotlin.compiler.incremental.log.level=info
```
To force the rebuild just run the 'clean' goal:
```
mvn clean install
```
174 lines
8.0 KiB
XML
174 lines
8.0 KiB
XML
<?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>1.1-SNAPSHOT</version>
|
|
<relativePath>../../pom.xml</relativePath>
|
|
</parent>
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<artifactId>kotlin-maven-plugin-test</artifactId>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>4.12</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.jetbrains.kotlin</groupId>
|
|
<artifactId>kotlin-maven-plugin</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
|
|
|
|
<resources>
|
|
<resource>
|
|
<directory>${project.basedir}/src/test/resources</directory>
|
|
<filtering>true</filtering>
|
|
</resource>
|
|
</resources>
|
|
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
|
|
<executions>
|
|
<execution>
|
|
<id>test-compile</id>
|
|
<phase>test-compile</phase>
|
|
<goals><goal>testCompile</goal></goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<artifactId>maven-deploy-plugin</artifactId>
|
|
<configuration>
|
|
<skip>true</skip>
|
|
</configuration>
|
|
</plugin>
|
|
</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-failsafe-plugin</artifactId>
|
|
<version>2.6</version>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>integration-test</goal>
|
|
<goal>verify</goal>
|
|
</goals>
|
|
<configuration>
|
|
<jvm>${env.JAVA_HOME}/bin/java</jvm>
|
|
<forkMode>once</forkMode>
|
|
<systemProperties>
|
|
<property>
|
|
<name>maven.home</name>
|
|
<value>${maven.home}</value>
|
|
</property>
|
|
<property>
|
|
<name>kotlin.version</name>
|
|
<value>${project.version}</value>
|
|
</property>
|
|
</systemProperties>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<artifactId>maven-invoker-plugin</artifactId>
|
|
<version>1.9</version>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.mozilla</groupId>
|
|
<artifactId>rhino</artifactId>
|
|
<version>1.7.7.1</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<configuration>
|
|
<projectsDirectory>src/it</projectsDirectory>
|
|
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
|
|
<pomIncludes>
|
|
<pomInclude>*/pom.xml</pomInclude>
|
|
</pomIncludes>
|
|
<properties>
|
|
<kotlin.version>${project.version}</kotlin.version>
|
|
</properties>
|
|
<!--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>
|
|
<extraArtifacts>
|
|
<artifact>org.jetbrains.kotlin:kotlin-maven-plugin:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-maven-allopen:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-maven-noarg:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-script-runtime:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-stdlib:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-stdlib-common:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-stdlib-js:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-stdlib-jre7:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-stdlib-jre8:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-reflect:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-test-parent:${project.version}:pom</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-test-common:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-test:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-test-js:${project.version}</artifact>
|
|
<artifact>org.jetbrains.kotlin:kotlin-script-util:${project.version}</artifact>
|
|
</extraArtifacts>
|
|
<showErrors>true</showErrors>
|
|
<postBuildHookScript>verify</postBuildHookScript>
|
|
<streamLogs>false</streamLogs>
|
|
<invokerPropertiesFile>invoker.properties</invokerPropertiesFile>
|
|
</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>
|
|
<property>
|
|
<name>skipTests</name>
|
|
<value>true</value>
|
|
</property>
|
|
</activation>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|