'Netty not working with Java 17 modular JDK

Split package issue for Netty with JDK 17. It is unmodularlized jar which I am trying to include in my modularized project. I added a module-info.java then included below requires

module mycustommodule {
    requires io.netty.buffer;
    requires io.netty.transport;
}
error: the unnamed module reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.all reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec.dns reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec.haproxy reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec.http reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec.http2 reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec.memcache reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec.mqtt reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec.redis reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec.smtp reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec.socks reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec.stomp reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.codec.xml reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.common reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.handler reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.handler.proxy reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.resolver reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.resolver.dns reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.transport.rxtx reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.transport.sctp reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.transport.udt reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.transport.classes.epoll reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.transport.unix.common reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.transport.classes.kqueue reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.resolver.dns.classes.macos reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.transport reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec
error: module io.netty.buffer reads package io.netty.handler.codec.xml from both io.netty.codec.xml and io.netty.codec


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source