Skip to content
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

Make some java platform modules optional #2913

Merged
merged 4 commits into from
Nov 5, 2020

Conversation

XakepSDK
Copy link
Contributor

@XakepSDK XakepSDK commented Nov 2, 2020

What i did:

  1. Removed java.logging module, looks like it's not required at all
  2. Made java.desktop module static
  3. Made java.xml module static
  4. Made java.sql module static, some changes in DateDeserializers.java were required

What i tested:
Env: Arch Linux, OpenJDK 14 (openjdk version "14.0.2" 2020-07-14)

  1. mvn package -P java14+ - compiles, all tests passed
  2. mvn package -P moditect,java14 - moditect plugin fails, happens for me on master too

Env: Arch Linux, OpenJDK 1.8 (openjdk version "1.8.0_265")

  1. mvn package - compiles, all tests passed
  2. mvn package -P moditect - moditect plugin fails, happens for me on master too
  3. mvn package -P java14+ - invalid flag --release
  4. mvn package -P moditect,java14+ - moditect plugin fails, happens for me on master too

Help wanted:
Not tested in environment without java.desktop, java.xml and java.sql modules
TODO: Test in environment without static modules
TODO: Make sure tests are running only if modules present

Fixes #2910

@XakepSDK XakepSDK changed the base branch from master to 2.12 November 2, 2020 11:35
@XakepSDK
Copy link
Contributor Author

XakepSDK commented Nov 2, 2020

Moditect error: Error: /home/user/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.12.0-rc2-SNAPSHOT/jackson-databind-2.12.0-rc2-SNAPSHOT.jar is a modular JAR file that cannot be specified with the --generate-module-info option

@GedMarc
Copy link

GedMarc commented Nov 2, 2020

Ok fortunately that just looks like maven-compiler config, grabbing your branch

@cowtowncoder
Copy link
Member

LGTM.

Xakep_SDK added 3 commits November 5, 2020 18:58
Serialization and deserialization of javax.xml classes (module java.xml) is handled by com.fasterxml.jackson.databind.ext.OptionalHandlerFactory, it already handles classes from java.xml module as optional.
Some java environments already don't have java.sql classes
Make DateDeserializers weakly depend on java.sql classes
Serialization is already weak, as pe [databind#1073]
java.desktop classes (java.beans.ConstructorProperties and java.beans.Transient) are used in com.fasterxml.jackson.databind.ext.Java7SupportImpl, if java.beans classes are not present, then jackson will not load Java7SupportImpl
@XakepSDK XakepSDK changed the title WIP: Make some java platform modules optional Make some java platform modules optional Nov 5, 2020
@XakepSDK
Copy link
Contributor Author

XakepSDK commented Nov 5, 2020

Travis ran without issues. LGTM too.

@cowtowncoder cowtowncoder merged commit 5ad9f04 into FasterXML:2.12 Nov 5, 2020
@cowtowncoder
Copy link
Member

@XakepSDK forgot to ask earlier, but have I asked for CLA before? I thought I might have, but not sure.
If I haven't, I'd need one from

https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf

and the usual method is to print, fill & sign, scan/photo, email to info at fasterxml dot com.
(if I have already gotten it, I'd just need to know name it was under to find email or filed version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make some java platform modules optional
3 participants