Hi Andy,

I have the exact same feeling and commons-io is yet another one.
I understand the intent to not bring a not used dep when you use only a
subset of archives but default experience is not nice.
Maybe all these transitive commons deps should be dropped, they dont make
much sense anymore IMHO.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 22 févr. 2024 à 13:08, Andrew Coates <big.andy.coa...@gmail.com> a
écrit :

> Hi all,
>
> I'm seeing a runtime failure using TarArchiveOutputStream when updating to
> commons-compress 1.26.0.
>
> java.lang.NoClassDefFoundError: org/apache/commons/codec/Charsets
>         at org.apache.commons.compress@1.26.0
>
> /org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.<init>(TarArchiveOutputStream.java:212)
>         at org.apache.commons.compress@1.26.0
>
> /org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.<init>(TarArchiveOutputStream.java:157)
>         at org.apache.commons.compress@1.26.0
>
> /org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.<init>(TarArchiveOutputStream.java:147)
>         at testcontainers@1.19.5
>
> /org.testcontainers.containers.ContainerState.copyFileToContainer(ContainerState.java:350)
>         ...
>
> Commons-compress 1.26.0 contains changes to make use of commons-codec,
> rather than its own copy of files, but I see that the POM marks
> commons-codec as *optional*. Excuse my potential ignorance, but I thought
> optional dependencies shouldn't cause runtime failures if not present.  Is
> this not the case?
>
> Obviously, I can just add commons-codec as an explicit dependency. But this
> seems wrong IMHO.
>
> Should I sign up for an account and raise this as a bug in Jira?
>
> Thanks,
>
> Andy
>

Reply via email to