aboutsummaryrefslogtreecommitdiff
path: root/pom.xml
diff options
context:
space:
mode:
authorYouri Bonnaffé <youribm@gmail.com>2020-07-03 02:05:14 +0200
committerGitHub <noreply@github.com>2020-07-02 17:05:14 -0700
commit03b29e98b88f123e0362691acfa8f6707f2cc930 (patch)
tree33f9fe39ebc1f2bdf69a0430e75d43d3710122c8 /pom.xml
parent92dda04600457176b15ba5d8cf4cfc3a22bd16aa (diff)
downloadjackson-databind-03b29e98b88f123e0362691acfa8f6707f2cc930.tar.gz
Java 14 specific tests (#2781)
Add a new test source folder, activated if JDK 14+ is used to build the project. The test-jdk14 folder contains only one test for now for records (JEP 359). The tests fail for now as record support will be implemented in another PR.
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml51
1 files changed, 51 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 38e2506cc..9a51e4f71 100644
--- a/pom.xml
+++ b/pom.xml
@@ -216,6 +216,57 @@
<skipTests>true</skipTests>
</properties>
</profile>
+ <profile>
+ <!-- Build Record tests using Java 14 if JDK is available -->
+ <id>java14+</id>
+ <activation>
+ <jdk>[14,</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-test-source</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>src/test-jdk14/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <optimize>true</optimize>
+ <!-- Enable Java 14+ for all sources so that Intellij picks the right language level -->
+ <source>14</source>
+ <release>14</release>
+ <compilerArgs>
+ <arg>-parameters</arg>
+ <arg>--enable-preview</arg>
+ </compilerArgs>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>--enable-preview</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>