Skip to content

Conversation

@zechtz
Copy link
Owner

@zechtz zechtz commented Dec 1, 2025

No description provided.

- Detect when JAVA_HOME or java executable points to asdf shims directory
- Use 'asdf which java' to resolve shims to actual Java installation
- Add support for SDKMAN Java installations
- Properly infer JAVA_HOME from resolved paths
- Fixes services failing with "JAVA_HOME not defined correctly" when using asdf

This resolves the issue where Vertex inherited JAVA_HOME pointing to
/.asdf/shims instead of the actual Java installation path
like /.asdf/installs/java/openjdk-21, causing Maven and
Gradle wrappers to fail.
- Allow services to override JAVA_HOME via service-specific environment variables
- Service-level JAVA_HOME takes precedence over profile-level Java override
- Automatically update PATH when service sets custom JAVA_HOME
- Environment variable precedence: Service > Profile > Global

This enables running services with different Java versions within the same
profile by setting JAVA_HOME in each service's environment variables.

Example usage:
- Service A: JAVA_HOME=/Users/user/.asdf/installs/java/openjdk-21
- Service B: JAVA_HOME=/Users/user/.asdf/installs/java/openjdk-17
- Add logJavaVersion helper function to detect and display Java version
- Show Java version, source (asdf/sdkman/system), and JAVA_HOME path
- Log information at service startup for easy debugging
- Helps verify per-service Java version override is working correctly

Example log output:
[INFO] Service EUREKA: Using Java 21.0.1 from asdf (/Users/user/.asdf/installs/java/openjdk-21)
[INFO] Service LEGACY: Using Java 17.0.5 from asdf (/Users/user/.asdf/installs/java/openjdk-17)
Backend changes:
- Add VerboseLogging boolean field to Service model
- Add verbose_logging column to services database table with migration
- Update GetStartCommand to add verbose flags when enabled:
  * Maven: adds -X flag for debug output
  * Gradle: adds -i flag for info level logging
- Update all database queries to include verbose_logging field

Frontend changes:
- Add verboseLogging field to Service TypeScript interface
- Add checkbox in ServiceConfigModal for toggling verbose logging
- Include helpful label: "Enable verbose logging (Maven: -X, Gradle: -i)"
- Initialize verboseLogging to false for new services

This feature helps debug build and startup issues by providing more
detailed logging output from Maven and Gradle build tools when enabled
on a per-service basis.
@zechtz zechtz merged commit b901715 into main Dec 1, 2025
7 checks passed
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