brettwooldridge / HikariCP

光 HikariCP・A solid, high-performance, JDBC connection pool at last.
Apache License 2.0
19.97k stars 2.93k forks source link

Jar with module-info for JDK11+ applications #1506

Open lanthale opened 4 years ago

lanthale commented 4 years ago

First thank you for all the effort regarding this library.

The only thing which is missing is module-info so that the lib is also working with jlink. It took me some time to reverse engineer the module-info.

Here is the maven code to get the lib (sorry for bad format):

<dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP-java9ea</artifactId>
            <version>2.6.1</version>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
</dependency>

module-info:
<module>
                                    <artifact>
                                        <groupId>com.zaxxer</groupId>
                                        <artifactId>HikariCP-java9ea</artifactId>                                   
                                    </artifact>                                    
                                    <moduleInfoSource>
                                        open module HikariCP { 

                                        requires java.logging;
                                        requires java.management;
                                        requires java.naming;
                                        requires java.sql;
                                        requires transitive pgjdbc.ng; 
                                        requires transitive org.slf4j;                                                                                                                                                             

                                        exports com.zaxxer.hikari;
                                        exports com.zaxxer.hikari.hibernate;
                                        exports com.zaxxer.hikari.metrics;
                                        exports com.zaxxer.hikari.metrics.dropwizard;                                        
                                        exports com.zaxxer.hikari.metrics.prometheus;
                                        exports com.zaxxer.hikari.pool;
                                        exports com.zaxxer.hikari.util;
                                        }
                                    </moduleInfoSource>
                                </module> 

Environment

HikariCP version: 2.6.1
JDK version     : openjdk version "11.0.5" 2019-10-15
Database        : PostgreSQL
Driver version  : 0.8.3 (pjdbc-ng)

⚠️ Please verify that your issue still occurs on the latest version of HikariCP before reporting.

FanJups commented 3 years ago

Hi @lanthale , I got the same problem. Please, could you share your full pom.xml file ? Thanks