-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MI] Impossible to build with JDK11 or JDK17 without setting the JAVA_TOOL_OPTIONS environment variable #3154
Comments
Upvote |
@chamilaadhi any comment/remark about wso2/maven-tools#118 ? I am trying to build MI on a private branch of v4.3.0-m1 but I would need to know how this dependency has been built, in order for me to create an equivalent but more recent Equinox runtime to start from: I have reached the point where you can build MI v4.3.0-m1 with jdk 17 (with JAVA_TOOL_OPTIONS set) but there are still some issues when "materialising" the product (I think those are due to inconsistent Import/Export packages and Service Component Runtime not being used/set properly):
|
@gspadotto do you know how to build the Dashboard? |
@yasirjanjua I usually build all the components. The only references (in master) to a Dashboard are here and here, so I suppose that the component to build is this. I have not found the Dashboard UI in the code of this repository. |
Description
Any 4.x.x version of MI cannot be built with reasonably recent JDKs unless you set the following environment variable:
export JAVA_TOOL_OPTIONS=' -Djdk.util.zip.disableZip64ExtraFieldValidation=true -Djdk.nio.zipfs.allowDotZipEntry=true --add-opens=java.base/java.net=ALL-UNNAMED '
This is due to the fact that the carbon-p2-plugin does not pass VM arguments to the P2ApplicationLauncher class:
https://github.com/wso2/maven-tools/blob/v5.1.2/carbon-p2-plugin/src/main/java/org/wso2/maven/p2/RepositoryGenMojo.java#L259-L269
In other terms, the carbon-p2-plugin never invokes this method:
https://github.com/eclipse-tycho/tycho/blob/tycho-0.25.0/sisu-equinox/sisu-equinox-launching/src/main/java/org/eclipse/sisu/equinox/launching/internal/P2ApplicationLauncher.java#L80-L84
There is no mention of this in the README.md file.
Steps to Reproduce
Clone the MI repository, checkout a recent tag (v4.2.0, v4.3.0-m1), follow the instructions to build it with either JDK11 or JDK17.
Affected Component
MI
Version
v4.2.0, v4.3.1-m1
Environment Details (with versions)
openjdk version "11.0.22" 2024-01-16
OpenJDK Runtime Environment Temurin-11.0.22+7 (build 11.0.22+7)
OpenJDK 64-Bit Server VM Temurin-11.0.22+7 (build 11.0.22+7, mixed mode)
Mac OS Big Sur (11.7.10)
Apache Maven 3.9.3 (21122926829f1ead511c958d89bd2f672198ae9f)
Maven home: /usr/local/apache-maven-3.9.3
Java version: 11.0.22, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
Default locale: en_IT, platform encoding: UTF-8
OS name: "mac os x", version: "11.7.10", arch: "x86_64", family: "mac"
Relevant Log Output
Related Issues
#3012
eclipse-tycho/tycho#3112
Suggested Labels
Affected/MI-4.x.x
The text was updated successfully, but these errors were encountered: