Skip to content

closes #315: Allow downloadURL to reference local file for oak-run ja…#316

Merged
krystian-panek-vmltech merged 4 commits intowttech:mainfrom
yfrickx-kbc:feature/allow-offline-oak-run-jar
Aug 28, 2025
Merged

closes #315: Allow downloadURL to reference local file for oak-run ja…#316
krystian-panek-vmltech merged 4 commits intowttech:mainfrom
yfrickx-kbc:feature/allow-offline-oak-run-jar

Conversation

@yfrickx-kbc
Copy link
Copy Markdown
Contributor

No description provided.

pkg/oak_run.go Outdated
log.Infof("downloading Oak Run JAR from URL '%s' to file '%s'", or.DownloadURL, jarFile)
if err := httpx.DownloadOnce(or.DownloadURL, jarFile); err != nil {
downloadURL := or.DownloadURL

Copy link
Copy Markdown
Contributor

@krystian-panek-vmltech krystian-panek-vmltech Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm there is similar logic already here

https://github.com/wttech/aemc/blob/main/pkg/java_manager.go#L63

if homeDir is defined then download url and downloading at all is skipped

IMO we should follow this pattern also for oak run; so new prop for preinstalled oak run need to be introduced then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I adjusted to also not need a copy anymore, local jar file will be used directly

@yfrickx-kbc yfrickx-kbc force-pushed the feature/allow-offline-oak-run-jar branch from d961b72 to 134475e Compare August 11, 2025 15:13
pkg/oak_run.go Outdated
DownloadURL: cv.GetString("vendor.oak_run.download_url"),
StorePath: cv.GetString("vendor.oak_run.store_path"),
DownloadURL: cv.GetString("vendor.oak_run.download_url"),
LocalJar: cv.GetString("vendor.oak_run.local_jar"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer just jar_file / JarFile

similar to existing dist_file or license_file in the aem.yml

pkg/oak_run.go Outdated
}
if check.UpToDate {
log.Debugf("existing OakRun '%s' is up-to-date", or.DownloadURL)
log.Debugf("existing OakRun (url: '%s', local: '%s') is up-to-date", or.DownloadURL, or.LocalJar)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if logging all details here is needed, just do like in jdk.go

@krystian-panek-vmltech
Copy link
Copy Markdown
Contributor

almost ready, thanks for contributing

@krystian-panek-vmltech krystian-panek-vmltech merged commit 11e66ba into wttech:main Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants