Files
kotlin-fork/libraries/tools/kotlin-maven-plugin-test/pom.xml
T
Aleksei.Cherepanov 07d369998c [Maven] Add test for the fix of illegal reflective access while using jdk17
IJ-203 dependency has illegal reflective access usage, which is prohibited without a special flag since JDK17. Specific reflect usage was fixed on the IntelliJ side (IDEA-31024). After the new IC was present in 1.8.0, this problem shows up on modules with a large number of source files in Maven projects. During the incremental compilation, FileSnapshotMap is filled up with paths to files as keys, so in the test, we generate a lot of source files with long names. If there are a lot of files to compile, a key chunk with paths overflowed and drops the current chunk to the disk, after that PersistentHashMap caches FilterOutputStream and uses illegal reflective access.
Closing caches after the first IC attempt fix this problem:
`63a0660c` IC: Close caches before falling back to non-incremental compile
`908dbf32` IC: Clean up closing caches logic in IncrementalCompilerRunner.kt
authored by Hung Nguyen
This commit should be reverted after the update of IJ dependency (KT-47765)

#KT-55709 Fixed

Merge-request: KT-MR-8359
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-01-27 07:26:17 +00:00

207 lines
10 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.8.255-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.13.1</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>${jdk_1_8}/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>
<property>
<name>maven.repo.local</name>
<value>${maven.repo.local}</value>
</property>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<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-maven-lombok:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-maven-sam-with-receiver:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-annotation-processing-maven:${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-jdk7:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-stdlib-jdk8:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-reflect:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-test-common:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-test-annotations-common:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-test:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-test-junit:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-test-junit5:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-test-testng:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-test-js:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-script-util:${project.version}</artifact>
<artifact>org.jetbrains.kotlin:kotlin-bom:${project.version}:pom</artifact>
</extraArtifacts>
<showErrors>true</showErrors>
<postBuildHookScript>verify</postBuildHookScript>
<streamLogs>false</streamLogs>
<invokerPropertiesFile>invoker.properties</invokerPropertiesFile>
<scriptVariables>
<kotlinVersion>${project.version}</kotlinVersion>
</scriptVariables>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<configuration>
<projectsDirectory>src/it</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
</configuration>
<!--<phase>package</phase>-->
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>integration-test-java9</id>
<configuration>
<projectsDirectory>src/it/java9</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/it/java9</cloneProjectsTo>
<javaHome>${jdk_9_0}</javaHome>
</configuration>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>integration-test-java17</id>
<configuration>
<projectsDirectory>src/it/java17</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/it/java17</cloneProjectsTo>
<javaHome>${jdk_17_0}</javaHome>
</configuration>
<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>