|
82 | 82 | <properties> |
83 | 83 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
84 | 84 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
85 | | - <target.java.version>1.8</target.java.version> |
| 85 | + <target.java.version>11</target.java.version> |
86 | 86 | <maven.compiler.source>${target.java.version}</maven.compiler.source> |
87 | 87 | <maven.compiler.target>${target.java.version}</maven.compiler.target> |
88 | 88 | <test.unit.pattern>**/*Test.*</test.unit.pattern> |
|
143 | 143 | plugin executes before, the property is undefined and makes the tests fail. Thus we define an empty property |
144 | 144 | here to make sure it doesn't fail. See also https://issues.apache.org/jira/browse/SUREFIRE-1431 --> |
145 | 145 | <argLine/> |
| 146 | + <extraJavaTestArgs> |
| 147 | + -XX:+IgnoreUnrecognizedVMOptions |
| 148 | + --add-opens=java.base/java.lang=ALL-UNNAMED |
| 149 | + --add-opens=java.base/java.lang.invoke=ALL-UNNAMED |
| 150 | + --add-opens=java.base/java.lang.reflect=ALL-UNNAMED |
| 151 | + --add-opens=java.base/java.io=ALL-UNNAMED |
| 152 | + --add-opens=java.base/java.net=ALL-UNNAMED |
| 153 | + --add-opens=java.base/java.nio=ALL-UNNAMED |
| 154 | + --add-opens=java.base/java.util=ALL-UNNAMED |
| 155 | + --add-opens=java.base/java.util.concurrent=ALL-UNNAMED |
| 156 | + --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED |
| 157 | + --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED |
| 158 | + --add-opens=java.base/sun.nio.ch=ALL-UNNAMED |
| 159 | + --add-opens=java.base/sun.nio.cs=ALL-UNNAMED |
| 160 | + --add-opens=java.base/sun.security.action=ALL-UNNAMED |
| 161 | + --add-opens=java.base/sun.util.calendar=ALL-UNNAMED |
| 162 | + -Djdk.reflect.useDirectMethodHandle=false |
| 163 | + -Dio.netty.tryReflectionSetAccessible=true |
| 164 | + </extraJavaTestArgs> |
146 | 165 | </properties> |
147 | 166 |
|
148 | 167 | <dependencies> |
|
425 | 444 | </dependencyManagement> |
426 | 445 |
|
427 | 446 | <profiles> |
| 447 | + <profile> |
| 448 | + <id>java8</id> |
| 449 | + <properties> |
| 450 | + <target.java.version>1.8</target.java.version> |
| 451 | + </properties> |
| 452 | + <build> |
| 453 | + <plugins> |
| 454 | + <plugin> |
| 455 | + <groupId>org.apache.maven.plugins</groupId> |
| 456 | + <artifactId>maven-compiler-plugin</artifactId> |
| 457 | + <configuration> |
| 458 | + <source>${target.java.version}</source> |
| 459 | + <target>${target.java.version}</target> |
| 460 | + <useIncrementalCompilation>false</useIncrementalCompilation> |
| 461 | + <compilerArgs > |
| 462 | + <!-- Prevents recompilation due to missing package-info.class, see MCOMPILER-205 --> |
| 463 | + <arg>-Xpkginfo:always</arg> |
| 464 | + </compilerArgs> |
| 465 | + </configuration> |
| 466 | + </plugin> |
| 467 | + </plugins> |
| 468 | + </build> |
| 469 | + </profile> |
428 | 470 | <profile> |
429 | 471 | <id>test-coverage</id> |
430 | 472 | <properties> |
|
510 | 552 | <plugin> |
511 | 553 | <groupId>org.apache.maven.plugins</groupId> |
512 | 554 | <artifactId>maven-compiler-plugin</artifactId> |
| 555 | + <version>3.8.0</version> |
| 556 | + <configuration> |
| 557 | + <source>${target.java.version}</source> |
| 558 | + <target>${target.java.version}</target> |
| 559 | + <!-- The semantics of this option are reversed, see MCOMPILER-209. --> |
| 560 | + <useIncrementalCompilation>false</useIncrementalCompilation> |
| 561 | + <compilerArgs > |
| 562 | + <arg>--add-exports=java.base/sun.net.util=ALL-UNNAMED</arg> |
| 563 | + <arg>--add-exports=java.management/sun.management=ALL-UNNAMED</arg> |
| 564 | + <arg>--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED</arg> |
| 565 | + <arg>--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED</arg> |
| 566 | + <arg>--add-exports=java.base/sun.nio.ch=ALL-UNNAMED</arg> |
| 567 | + <!-- Prevents recompilation due to missing package-info.class, see MCOMPILER-205 --> |
| 568 | + <arg>-Xpkginfo:always</arg> |
| 569 | + </compilerArgs> |
| 570 | + </configuration> |
513 | 571 | </plugin> |
514 | 572 |
|
515 | 573 | <plugin> |
|
639 | 697 | <junit.jupiter.execution.parallel.config.strategy>dynamic |
640 | 698 | </junit.jupiter.execution.parallel.config.strategy> |
641 | 699 | </systemPropertyVariables> |
642 | | - <argLine>@{argLine} -Xms256m -Xmx2048m -XX:+UseG1GC</argLine> |
| 700 | + <argLine>@{argLine} -Xms256m -Xmx2048m -XX:+UseG1GC ${extraJavaTestArgs}</argLine> |
643 | 701 | </configuration> |
644 | 702 | <executions> |
645 | 703 | <!--execute all the unit tests--> |
|
692 | 750 | <configuration> |
693 | 751 | <rules> |
694 | 752 | <requireMavenVersion> |
695 | | - <!-- enforce at least mvn version 3.1.1 (see FLINK-12447) --> |
696 | | - <version>[3.1.1,)</version> |
| 753 | + <!-- enforce at least mvn version 3.8.6 --> |
| 754 | + <version>[3.8.6,)</version> |
697 | 755 | </requireMavenVersion> |
698 | 756 | <requireJavaVersion> |
699 | 757 | <version>${target.java.version}</version> |
|
879 | 937 | <artifactId>maven-compiler-plugin</artifactId> |
880 | 938 | <version>3.8.0</version> |
881 | 939 | <configuration> |
| 940 | + <!-- Make sure that we only use Java 8 compatible APIs --> |
882 | 941 | <source>${target.java.version}</source> |
883 | 942 | <target>${target.java.version}</target> |
884 | 943 | <!-- The semantics of this option are reversed, see MCOMPILER-209. --> |
|
0 commit comments