You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "akatkere (via GitHub)" <gi...@apache.org> on 2023/03/29 19:45:43 UTC

[GitHub] [httpcomponents-core] akatkere opened a new pull request, #399: HTTPCORE-737: Add maven.compiler.release if build jdk >= 9

akatkere opened a new pull request, #399:
URL: https://github.com/apache/httpcomponents-core/pull/399

   This change makes sure if build jdk is based on Java >=9 API compatibility with Java 8 is maintained. Current source and target flags make sure source is Java 8 and generated byte code is Java 8 but it does not the package is compiled against Java 8 API.
   
   
   Tested with both Java 8 and Java 11 build jdk. And tested Java 11 generated jar in a Java 8 runtime.


-- 
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-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] rschmitt commented on pull request #399: HTTPCORE-737: Add maven.compiler.release if build jdk >= 9

Posted by "rschmitt (via GitHub)" <gi...@apache.org>.
rschmitt commented on PR #399:
URL: https://github.com/apache/httpcomponents-core/pull/399#issuecomment-1491262565

   > The problem is that the activation gets triggered for the host JDK and not that used to compile the artifacts.
   
   Is this a documented behavior, or a bug in Maven? I can't understand how this behavior could ever be correct.


-- 
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-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] ok2c commented on pull request #399: HTTPCORE-737: Add maven.compiler.release if build jdk >= 9

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c commented on PR #399:
URL: https://github.com/apache/httpcomponents-core/pull/399#issuecomment-1491305977

   > Is this a documented behavior, or a bug in Maven? I can't understand how this behavior could ever be correct.
   
   @rschmitt I am not sure. The behavior looks wrong to me but from the Maven perspective it might well be a feature. At any rate if the Maven Toolchain has been configured correctly the JRE based activation should likely never be required.
   
   


-- 
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-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] ok2c commented on pull request #399: HTTPCORE-737: Add maven.compiler.release if build jdk >= 9

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
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-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] ok2c closed pull request #399: HTTPCORE-737: Add maven.compiler.release if build jdk >= 9

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c closed pull request #399: HTTPCORE-737: Add maven.compiler.release if build jdk >= 9
URL: https://github.com/apache/httpcomponents-core/pull/399


-- 
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-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] akatkere commented on pull request #399: HTTPCORE-737: Add maven.compiler.release if build jdk >= 9

Posted by "akatkere (via GitHub)" <gi...@apache.org>.
akatkere commented on PR #399:
URL: https://github.com/apache/httpcomponents-core/pull/399#issuecomment-1489768051

   OK, in that case if we want httpcore5 to work on Java 8 runtime we just need to make sure we build with Java 8. In which csse no pom.xml changes are required.


-- 
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-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-core] ok2c commented on pull request #399: HTTPCORE-737: Add maven.compiler.release if build jdk >= 9

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c commented on PR #399:
URL: https://github.com/apache/httpcomponents-core/pull/399#issuecomment-1489798750

   > OK, in that case if we want httpcore5 to work on Java 8 runtime we just need to make sure we build with Java 8. In which case no pom.xml changes are required.
   
   @akatkere Unfortunately it is so.


-- 
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-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org