Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDS archive specific configuration #1039

Open
romain-grecourt opened this issue May 10, 2024 · 0 comments
Open

CDS archive specific configuration #1039

romain-grecourt opened this issue May 10, 2024 · 0 comments
Labels

Comments

@romain-grecourt
Copy link
Contributor

Provide CDS specific parameters:

  • cdsJvmOptions
  • cdsArgs
  • cdsDebugOptions

helidon:jlink-image requires the working directory to be the -jri directory, this is an issue when the application code relies on the working directory to be the project directory.

E.g.

  • Using config files relative the project directory
  • Using static content directory as path (not resource) relative to the project directory

When building the CDS archive, the application is started with the -jri directory as the working directory, thus the relative paths are broken.

The application can work-around it by using configuration to control the static path.
E.g.

Path web = config.get("app.static.path")
        .as(Path.class)
        .orElseGet(() -> Paths.get("web"));

However this requires passing -Dapp.static.path="../../web" as a JVM option as part of the CDS archive start.

Currently the only way to do this is by using: jlink.image.defaultJvmOptions, but this also hard-codes it as a default for the application.


Ideally we'd have ways to have different values for the CDS archive startup and the actual hard-coded default.

During the build the JRI directory is target/helidon-quickstart-se-ri/ thus the relative path to the project directory is ../.. which is not a nice default value.

Ideally you'd have the relative path as .., E.g.

|- config/prod.yaml
|- web/
|- helidon-quickstart-se-ri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant