a-sit-plus / vck

Kotlin Multiplatform library implementing W3C VC Data Model and ISO 18013-5 mDL
https://a-sit-plus.github.io/vck/
Apache License 2.0
29 stars 2 forks source link

Maven build breaks due to non existing transitive dependencies in vck 5.0.0 #144

Open kstudent opened 1 month ago

kstudent commented 1 month ago

I can't include vck 5.0.0 in a maven project because maven cant resolve the following dependencies:

$ mvn clean install
...
The following artifacts could not be resolved:
- io.matthewnelson.encoding:core:jar:null (absent)
- io.matthewnelson.encoding:base16:jar:null (absent)
- io.matthewnelson.encoding:base64:jar:null (absent)

Those dependencies are transitive via vck / openid-data-classes:

$ mvn dependency:tree
...
[INFO] +- at.asitplus.wallet:vck-openid-jvm:jar:5.0.0:compile
[INFO] |  \- at.asitplus.wallet:openid-data-classes-jvm:jar:5.0.0:compile
[INFO] |     +- io.matthewnelson.encoding:core:jar:null:compile
[INFO] |     +- io.matthewnelson.encoding:base16:jar:null:compile
[INFO] |     \- io.matthewnelson.encoding:base64:jar:null:compil
...

My guess is that the version of the encoding artifacts is absent in gradle-conventions-plugin:

https://github.com/a-sit-plus/vck/blob/release/5.0.0/openid-data-classes/build.gradle.kts:

api("io.matthewnelson.encoding:core:${AspVersions.versions["encoding"]}")
api("io.matthewnelson.encoding:base16:${AspVersions.versions["encoding"]}")
api("io.matthewnelson.encoding:base64:${AspVersions.versions["encoding"]}")

https://github.com/a-sit-plus/gradle-conventions-plugin/blob/3f1fe1b97a8fda7e1877379148755b42b4c8b0f6/legacy/src/main/resources/versions.properties

Current Workarround: Exclude dependencies and include them directly with a specified version.

<dependency>
      <groupId>at.asitplus.wallet</groupId>
      <artifactId>vck-jvm</artifactId>
      <exclusions>
        <exclusion>
          <groupId>io.matthewnelson.encoding</groupId>
          <artifactId>core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>io.matthewnelson.encoding</groupId>
          <artifactId>base64</artifactId>
        </exclusion>
        <exclusion>
          <groupId>io.matthewnelson.encoding</groupId>
          <artifactId>base16</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
JesusMcCloud commented 1 month ago

It's a bug with the publishing plugin and there's nothing we can do to fix it, but report it upstream. @n0900, please post your maven workaround here (it works with gradle).