spotify / dns-java

DNS wrapper library that provides SRV lookup functionality
Apache License 2.0
206 stars 47 forks source link

Published jar's pom.xml lists outdated dnsjava dependency #58

Closed jbrinegar closed 1 year ago

jbrinegar commented 1 year ago

I experienced this bug in my application, which is not a recent bug: https://github.com/dnsjava/dnsjava/pull/177

I am using the latest com.spotify:dns:3.2.2, but I was not specifying the downstream dnsjava dependency version explicitly. Note that this repo's pom.xml lists:

        <dependency>
            <groupId>dnsjava</groupId>
            <artifactId>dnsjava</artifactId>
            <version>3.4.2</version>
        </dependency>

However, I noted that my resolved jar in a distribution is:

$ ls -al *dns*
-rw-rw-r-- 1 root root  37162 Dec 14 18:06 dns-3.2.2.jar
-rw-rw-r-- 1 root root 399838 Dec 14 18:06 dnsjava-3.0.2.jar

This lines up with what gradle's dependencies tool shows:

|    |    |    |    +--- com.spotify:dns -> 3.2.2
|    |    |    |    |    +--- dnsjava:dnsjava:3.0.2

Finally, I observed that the pom.xml included in the com.spotify:dns:3.2.2 jar is not 3.4.2:

        <dependency>
            <groupId>dnsjava</groupId>
            <artifactId>dnsjava</artifactId>
            <version>3.0.2</version>
        </dependency>

I resolved my issue by forcing dnsjava to the latest version (3.5.2). It would be great if users of this library did not need to do that manually though!

jbrinegar commented 1 year ago

3.3.2 is fine. Not sure how I ended up with 3.2.2 :)