Skip to content

Add uses for Module in module-info #2485

@GedMarc

Description

@GedMarc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions