Hi,
I agree the launcher should be able to properly handle FAR files and use
the artifacts from within the FAR; I don't think we need a switch to
control this.
The launcher should check in the cache first, then the FAR file and then
the configured repositories.
Regards
Carsten
Am 17.03.2022 um 12:14 schrieb Dr. Hans-Peter Störr:
Hi Eric!
Thanks for your answer! Ah, indeed I let myself be confused by the loads of
stacktraces that are logged. You are right: if I try
java -jar org.apache.sling.feature.launcher.jar -f
org.apache.sling.starter-12-oak_tar_far.far -u
'jar:file:felixcontainer.zip!'
that works, too - but after logging some 2900 lines with more than 245
stacktraces like this:
[INFO] Artifact not found in one repository
java.io.FileNotFoundException: JAR entry
commons-codec/commons-codec/1.15/commons-codec-1.15.jar not found in
felixcontainer.zip
at
java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:147)
at
org.apache.sling.feature.io.artifacts.ArtifactManager$DefaultArtifactHandler.getArtifact(ArtifactManager.java:424)
at
org.apache.sling.feature.io.artifacts.ArtifactManager.getArtifactHandler(ArtifactManager.java:248)
at
org.apache.sling.feature.launcher.impl.FeatureProcessor$1.provide(FeatureProcessor.java:86)
at
org.apache.sling.feature.launcher.impl.FeatureProcessor.lambda$createApplication$4(FeatureProcessor.java:120)
at
org.apache.sling.feature.io.archive.ArchiveReader.read(ArchiveReader.java:121)
at
org.apache.sling.feature.launcher.impl.FeatureProcessor.createApplication(FeatureProcessor.java:118)
at
org.apache.sling.feature.launcher.impl.Bootstrap.assemble(Bootstrap.java:208)
at
org.apache.sling.feature.launcher.impl.Bootstrap.run(Bootstrap.java:123)
at org.apache.sling.feature.launcher.impl.Main.main(Main.java:402)
So I'd certainly suggest to remove the stacktrace on these messages, and maybe
even demote them to DEBUG messages so that they only appear when -v is given.
But I'm still wondering whether the launcher should even look into the
repositories if the artifact is in the FAR. Maybe there should be a switch to
turn that off. There is some sense to that in a development setting (it seems
an updated JAR in $HOME/.m2/repository gets replaced on launcher restart), but
not if you set up a server.
Thanks and best regards,
Hans-Peter
--
Carsten Ziegeler
Adobe
cziege...@apache.org