echo Removing relevant files from local Maven repository ...
rm -rf ~/.m2/repository/com/github/ajalt/clikt/clikt/4.2.2
echo Running script, which will populate relevant files in local Maven repsoitory ...
kscript mctest.kts
echo Listing the newly created files ...
ls -l ~/.m2/repository/com/github/ajalt/clikt/clikt/4.2.2
echo Computing the SHA1 digest of the pom file ...
sha1sum ~/.m2/repository/com/github/ajalt/clikt/clikt/4.2.2/clikt-4.2.2.pom | cut -d" " -f1
echo and it should be ...
cat ~/.m2/repository/com/github/ajalt/clikt/clikt/4.2.2/clikt-4.2.2.pom.sha1
echo
echo Computing the SHA1 digest of the jar file ...
sha1sum ~/.m2/repository/com/github/ajalt/clikt/clikt/4.2.2/clikt-4.2.2.jar | cut -d" " -f1
echo and it should be ...
cat ~/.m2/repository/com/github/ajalt/clikt/clikt/4.2.2/clikt-4.2.2.jar.sha1
echo
echo Listing contents of jar ...
unzip -l ~/.m2/repository/com/github/ajalt/clikt/clikt/4.2.2/clikt-4.2.2.jar
When run, this script downloads a suspiciously small-looking jar, and the SHA1 digests look OK, but the jar seems to contain Kotlin native modules:
$ sh mctest.sh
Removing relevant files from local Maven repository ...
Running script, which will populate relevant files in local Maven repsoitory ...
[kscript] Resolving com.github.ajalt.clikt:clikt:4.2.2...
Hello, world!
Listing the newly created files ...
total 64
-rw-rw-r-- 1 vinay vinay 48093 Jan 25 18:55 clikt-4.2.2.jar
-rw-rw-r-- 1 vinay vinay 40 Jan 25 18:55 clikt-4.2.2.jar.sha1
-rw-rw-r-- 1 vinay vinay 1920 Jan 25 18:55 clikt-4.2.2.pom
-rw-rw-r-- 1 vinay vinay 40 Jan 25 18:55 clikt-4.2.2.pom.sha1
-rw-rw-r-- 1 vinay vinay 248 Jan 25 18:55 _remote.repositories
Computing the SHA1 digest of the pom file ...
b10231f98a134997df488c24173cc17d65cf1fbe
and it should be ...
b10231f98a134997df488c24173cc17d65cf1fbe
Computing the SHA1 digest of the jar file ...
9fa1ca9cd993e1a908288be631d49af435e6c638
and it should be ...
9fa1ca9cd993e1a908288be631d49af435e6c638
Listing contents of jar ...
Archive: /home/vinay/.m2/repository/com/github/ajalt/clikt/clikt/4.2.2/clikt-4.2.2.jar
Length Date Time Name
--------- ---------- ----- ----
0 1980-02-01 00:00 META-INF/
25 1980-02-01 00:00 META-INF/MANIFEST.MF
2525 1980-02-01 00:00 META-INF/kotlin-project-structure-metadata.json
0 1980-02-01 00:00 commonMain/
0 1980-02-01 00:00 commonMain/default/
120 1980-02-01 00:00 commonMain/default/manifest
0 1980-02-01 00:00 commonMain/default/linkdata/
724 1980-02-01 00:00 commonMain/default/linkdata/module
0 1980-02-01 00:00 commonMain/default/linkdata/package_com/
15 1980-02-01 00:00 commonMain/default/linkdata/package_com/0_com.knm
0 1980-02-01 00:00 commonMain/default/linkdata/package_com.github/
22 1980-02-01 00:00 commonMain/default/linkdata/package_com.github/0_github.knm
0 1980-02-01 00:00 commonMain/default/linkdata/package_com.github.ajalt/
28 1980-02-01 00:00 commonMain/default/linkdata/package_com.github.ajalt/0_ajalt.knm
[lines elided]
12 1980-02-01 00:00 commonMain/default/linkdata/root_package/0_.knm
0 1980-02-01 00:00 nativeMain/
0 1980-02-01 00:00 nativeMain/default/
0 1980-02-01 00:00 nativeMain/default/linkdata/
207 1980-02-01 00:00 nativeMain/default/linkdata/module
0 1980-02-01 00:00 nativeMain/default/linkdata/package_com.github.ajalt.clikt.mpp/
357 1980-02-01 00:00 nativeMain/default/linkdata/package_com.github.ajalt.clikt.mpp/0_mpp.knm
[lines elided]
196 1980-02-01 00:00 nativeMain/default/manifest
0 1980-02-01 00:00 commonMain/default/resources/
0 1980-02-01 00:00 nativeMain/default/resources/
0 1980-02-01 00:00 nativeMain/default/targets/
0 1980-02-01 00:00 nativeMain/default/targets/linux_x64/
0 1980-02-01 00:00 nativeMain/default/targets/linux_x64/included/
0 1980-02-01 00:00 nativeMain/default/targets/linux_x64/kotlin/
0 1980-02-01 00:00 nativeMain/default/targets/linux_x64/native/
--------- -------
63812 85 files
It's just started doing this. For comparison, here's an older version of the jar - 3.4.2 - which was also done via dependency resolution, but not recently:
I'm using this Kotlin script to demonstrate:
I set up this shell script to show the problem:
When run, this script downloads a suspiciously small-looking jar, and the SHA1 digests look OK, but the jar seems to contain Kotlin native modules:
It's just started doing this. For comparison, here's an older version of the jar - 3.4.2 - which was also done via dependency resolution, but not recently:
Could I have done something unintentionally to cause this behavior to start occurring?