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

Add uses for Module in module-info #2485

Closed
GedMarc opened this issue Oct 3, 2019 · 1 comment
Closed

Add uses for Module in module-info #2485

GedMarc opened this issue Oct 3, 2019 · 1 comment
Milestone

Comments

@GedMarc
Copy link

GedMarc commented Oct 3, 2019

Hi,

Currently the module info does not specify that it consumes any service providers, causing an error when building up an artefact -

Providers:
[INFO]   com.fasterxml.jackson.databind provides com.fasterxml.jackson.core.ObjectCodec not used by any observable module
[INFO]   com.fasterxml.jackson.datatype.jdk8 provides com.fasterxml.jackson.databind.Module not used by any observable module
[INFO]   com.hazelcast.all provides com.hazelcast.client.ClientExtension used by com.hazelcast.all
[INFO]   com.hazelcast.all provides com.hazelcast.com.fasterxml.jackson.core.JsonFactory used by com.hazelcast.all
[INFO]   com.hazelcast.all provides com.hazelcast.internal.serialization.DataSerializerHook used by com.hazelcast.all

To correct this I suggest adding the following statements into the module-info (the uses clauses)

module com.fasterxml.jackson.databind {
  requires java.desktop;
  requires java.logging;
  requires transitive com.fasterxml.jackson.annotation;
  requires transitive com.fasterxml.jackson.core;
  requires java.sql;
  requires java.xml;
  requires java.base;
  
  exports com.fasterxml.jackson.databind;
  exports com.fasterxml.jackson.databind.annotation;
  exports com.fasterxml.jackson.databind.cfg;
  exports com.fasterxml.jackson.databind.deser;
  exports com.fasterxml.jackson.databind.deser.impl;
  exports com.fasterxml.jackson.databind.deser.std;
  exports com.fasterxml.jackson.databind.exc;
  exports com.fasterxml.jackson.databind.ext;
  exports com.fasterxml.jackson.databind.introspect;
  exports com.fasterxml.jackson.databind.json;
  exports com.fasterxml.jackson.databind.jsonFormatVisitors;
  exports com.fasterxml.jackson.databind.jsonschema;
  exports com.fasterxml.jackson.databind.jsontype;
  exports com.fasterxml.jackson.databind.jsontype.impl;
  exports com.fasterxml.jackson.databind.module;
  exports com.fasterxml.jackson.databind.node;
  exports com.fasterxml.jackson.databind.ser;
  exports com.fasterxml.jackson.databind.ser.impl;
  exports com.fasterxml.jackson.databind.ser.std;
  exports com.fasterxml.jackson.databind.type;
  exports com.fasterxml.jackson.databind.util;

uses com.fasterxml.jackson.databind.Module;
  
  provides com.fasterxml.jackson.core.ObjectCodec with com.fasterxml.jackson.databind.ObjectMapper;
}

This is linked to FasterXML/jackson-jdk11-compat-test#3

@cowtowncoder cowtowncoder changed the title 2.10 Patch 1 - Error in module-info Add uses for Module in module-info Oct 3, 2019
@cowtowncoder cowtowncoder modified the milestones: 2.10.0, 2.10.1 Oct 3, 2019
@cowtowncoder
Copy link
Member

Added uses clause (and import for base which I assume is nice to have but not mandatory)

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

No branches or pull requests

2 participants