<@U0HTHR7NH> with this tika-app downloading all th...
# lucee
z
@cfsimplicity with this tika-app downloading all the dependencies problem, are you only using a subset of the functionality?
c
Just text parsing and language detection really.
z
bit of a chicken and egg problem, you don't need all the dependencies unless you access any of the functionality which requires them, which then will throw classNotFound errors and I don't think we can lazy load them either.... hmmm, i guess we could support via a flag to the maven definition syntax in javaSettings to disable the automatic downloading of dependencies for a given artifact?
c
I guess so. TBH I don't fully understand how all this dependency management works, but I thought that the
tika-app.jar
was self-contained. According to its MVN page, it has no "runtime" dependencies, only "compile" dependencies, which I take to mean everything it needs is baked into the jar. That's been my experience in practice. I've never had to download anything else other than
tika-app.jar
(55MB) to use it. Why does Lucee need to download 250MB+ of dependencies? Is that in case you want to run a Tika server or something? But then there's a different artifact
tika-server-standard.jar
for that.
z
Normally in java land, like with Lucee, we have to manually include the required dependencies in
pom.xml
Lucee is different, in that it's automatically managing all this which usually works very nicely, just include the base artifact and everything required is downloaded and just works Sure it's working for you without the dependencies, but I'm guessing with certain file types / operations, tika will crash out? looking at the pom for https://mvnrepository.com/artifact/org.apache.tika/tika-app/3.2.0 maven lists these as compile dependencies, there's no scope in the pom.xml, so it defaults to both compile and runtime, so Lucee is recursively pulling em down https://repo1.maven.org/maven2/org/apache/tika/tika-app/3.2.0/tika-app-3.2.0.pom We could try something like adding a
dependencies=boolean
to
mavenLoad()
? https://docs.lucee.org/reference/functions/mavenload.html
Copy code
mavenLoad(input=['org.apache.tika:tika-app:3.2.0'], dependencies=false);
https://www.perplexity.ai/search/maven-compile-dependencies-IfVXvozvQ4mkDfDEt6zjCQ
c
According to the Maven docs, if the pom has no scope for the dependency it defaults to just compile, not compile and runtime (hence why the Tika MVN page only lists compile dependencies). Why would Lucee treat the pom differently?