barcode-java icon indicating copy to clipboard operation
barcode-java copied to clipboard

Lib can't be pulled from Maven since 2.2

Open zzrough opened this issue 10 months ago • 11 comments

hello,

Thanks for the library, I'm using it from quite a long time and it works nice!

I was using the 1.x branch and wanted to switch to the latest (2.6.1) but I see the artifacts are hosed since 2.2. I get the error: The following artifacts could not be resolved: com.pnuema.java:barcode:jar:2.6.1 (absent) when using the dependency example shown in the README.

If I check on mvnrepository, it's ok in 2.1: image image

But in 2.2, it's not published the same we see a -jar.jar: image image

I see a commit mentioning a classifier change which is certainly the -jar is all about. I did not add the dependency in a fancy way but it does not see to work anymore from 2.2 onwards.

best regards, --Stef

zzrough avatar Apr 07 '24 08:04 zzrough

(I had to add jar in the dependency node, but it's the only lib I need to do this, I wonder why)

zzrough avatar Apr 07 '24 08:04 zzrough

What the ... Why is it tacking on a funky name. I'll look at this

barnhill avatar Apr 07 '24 15:04 barnhill

Just published 2.6.2 that should have the archive name corrected. It takes some time to sync with maven central then Ive got my personal project that uses it and Ill try to pull it in there to make sure the dependency resolution works correctly.

barnhill avatar Apr 07 '24 15:04 barnhill

Looks like its already available. I just built my project and pulled that in successfully. Let me know if this works for you to switch to version 2.6.2

Screenshot 2024-04-07 at 10 48 39 AM

barnhill avatar Apr 07 '24 15:04 barnhill

hey I answered just after your comment from email but I see my reply was not sent over github or it does not work anymore to reply by email?

it works great! so fast to fix it!
thanks a lot!
--Stef

But, when running in UAT I spot we had many new librairies:

*** kotlin-android-extensions-1.9.22.jar ***
*** kotlin-build-tools-api-1.9.22.jar ***
*** kotlin-compiler-embeddable-1.9.22.jar ***
*** kotlin-compiler-runner-1.9.22.jar ***
*** kotlin-daemon-client-1.9.22.jar ***
*** kotlin-daemon-embeddable-1.9.22.jar ***
*** kotlin-gradle-plugin-1.9.22.jar ***
*** kotlin-gradle-plugin-annotations-1.9.22.jar ***
*** kotlin-gradle-plugin-api-1.9.22.jar ***
*** kotlin-gradle-plugin-idea-1.9.22.jar ***
*** kotlin-gradle-plugin-idea-proto-1.9.22.jar ***
*** kotlin-gradle-plugin-model-1.9.22.jar ***
*** kotlin-klib-commonizer-api-1.9.22.jar ***
*** kotlin-native-utils-1.9.22.jar ***
*** kotlin-project-model-1.9.22.jar ***
*** kotlin-scripting-common-1.9.22.jar ***
*** kotlin-scripting-compiler-embeddable-1.9.22.jar ***
*** kotlin-scripting-compiler-impl-embeddable-1.9.22.jar ***
*** kotlin-scripting-jvm-1.9.22.jar ***
*** kotlin-stdlib-1.9.22.jar ***
*** kotlin-tooling-core-1.9.22.jar ***
*** kotlin-util-io-1.9.22.jar ***
*** kotlin-util-klib-1.9.22.jar ***
*** kotlinx-coroutines-core-jvm-1.7.3.jar ***

I see the project brings kotlin-stdlib in compile scope but I don't see any use in the source code? The rest is runtime but pulled of transitively so the barcode project adds many libraries.

--Stef

zzrough avatar Apr 11 '24 08:04 zzrough

Probably this line in the Gradle config

https://github.com/barnhill/barcode-java/blob/master/build.gradle.kts#L24

barnhill avatar Apr 12 '24 02:04 barnhill

This project does use dokka for javadoc generation and that uses kotlin but the actual project doesnt.

Even removing this doesnt change the size of the jar.

Screenshot 2024-04-11 at 10 59 27 PM

barnhill avatar Apr 12 '24 03:04 barnhill

I did remove those and published 2.6.3 tonight to see if that helps you all. Please let me know if removing those dependencies in this commit helped.

https://github.com/barnhill/barcode-java/compare/2.6.2...2.6.3

barnhill avatar Apr 12 '24 04:04 barnhill

thanks, I tested with 2.6.3 the change is very different, my app total distribution size:

  • with 1.16: 92MB
  • with 2.6.2: 167MB
  • with 2.6.3: 95MB

I see indeed the dokka deps pulling deps a bit: image

I received the following extra transitive deps:

  • annotations-23.0.0.jar
  • dokka-core-1.9.20.jar
  • dokka-gradle-plugin-1.9.20.jar
  • jackson-module-kotlin-2.16.1.jar
  • kotlinx-coroutines-core-jvm-1.7.3.jar

I did not practice Gradle for a long time, but it seems to me this should be a plugin (in plugins section), not a project dependency (in dependency section)? https://kotlin.github.io/dokka/1.4.0/user_guide/gradle/usage/

zzrough avatar Apr 12 '24 06:04 zzrough

But I see it's way down from the previous.

barnhill avatar Apr 12 '24 11:04 barnhill

yes it's better but still brings a couple of libs from dokka... I'll ignore them in my project for the time being :+1: thanks for your help

zzrough avatar Apr 16 '24 13:04 zzrough

Going to close this since the artifact is available via maven again

barnhill avatar Aug 02 '24 18:08 barnhill