ok2c commented on PR #399: URL: https://github.com/apache/httpcomponents-core/pull/399#issuecomment-1489733139
@akatkere Unfortunately this approach is not compatible with Maven Toolchain and fails when building the project with Java 11 or above and Maven Toolchain. The problem is that the activation gets triggered for the host JDK and not that used to compile the artifacts. ``` [INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ httpcore5 --- [INFO] Toolchain in maven-compiler-plugin: JDK[/opt/java-1.8] [INFO] Changes detected - recompiling the module! [INFO] Compiling 514 source files to /home/oleg/src/apache.org/httpcomponents/httpcore/httpcore5/target/classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] javac: invalid flag: --release Usage: javac <options> <source files> use -help for a list of possible options [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Apache HttpComponents Core Parent 5.2.2-SNAPSHOT: [INFO] [INFO] Apache HttpComponents Core Parent .................. SUCCESS [ 2.763 s] [INFO] Apache HttpComponents Core HTTP/1.1 ................ FAILURE [ 5.392 s] [INFO] Apache HttpComponents Core HTTP/2 .................. SKIPPED [INFO] Apache HttpComponents Core Reactive Extensions ..... SKIPPED [INFO] Apache HttpComponents Core Integration Tests ....... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8.338 s [INFO] Finished at: 2023-03-30T07:41:13+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project httpcore5: Compilation failure [ERROR] javac: invalid flag: --release [ERROR] Usage: javac <options> <source files> [ERROR] use -help for a list of possible options ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org