From 9cc37562d744617c05ee971e7d22089fb167cd69 Mon Sep 17 00:00:00 2001 From: Adva Oren Date: Mon, 27 Apr 2026 15:22:27 +0300 Subject: [PATCH 1/2] feat(python): add uv path settings and bump java client (TC-3860) Add uv executable path setting to the settings UI with TRUSTIFY_DA_UV_PATH system property propagation. Bump trustify-da-java-client to 0.0.17-SNAPSHOT and api-spec to 2.0.7 for pip report-based pyproject.toml support and uv provider. Co-Authored-By: Claude Opus 4.6 --- gradle/libs.versions.toml | 4 ++-- .../tools/intellij/exhort/ApiService.java | 5 +++++ .../settings/ApiSettingsComponent.java | 21 +++++++++++++++++++ .../settings/ApiSettingsConfigurable.java | 3 +++ .../intellij/settings/ApiSettingsState.java | 1 + 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 07a4627..6cc7c5b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,8 +3,8 @@ caffeine = "3.1.8" commons-compress = "1.21" commons-io = "2.16.1" -trustify-da-api-spec = "2.0.2" -trustify-da-java-client = "0.0.16" +trustify-da-api-spec = "2.0.7" +trustify-da-java-client = "0.0.17-SNAPSHOT" github-api = "1.314" junit = "4.13.2" mockito = "5.14.2" diff --git a/src/main/java/org/jboss/tools/intellij/exhort/ApiService.java b/src/main/java/org/jboss/tools/intellij/exhort/ApiService.java index 6b7dc3b..30f0921 100644 --- a/src/main/java/org/jboss/tools/intellij/exhort/ApiService.java +++ b/src/main/java/org/jboss/tools/intellij/exhort/ApiService.java @@ -274,6 +274,11 @@ public static void setCommonRequestProperties() { System.clearProperty("TRUSTIFY_DA_PYTHON_PATH"); System.clearProperty("TRUSTIFY_DA_PIP_PATH"); } + if (settings.uvPath != null && !settings.uvPath.isBlank()) { + System.setProperty("TRUSTIFY_DA_UV_PATH", settings.uvPath); + } else { + System.clearProperty("TRUSTIFY_DA_UV_PATH"); + } if (settings.usePythonVirtualEnv) { System.setProperty("TRUSTIFY_DA_PYTHON_VIRTUAL_ENV", "true"); if (settings.pythonInstallBestEfforts) { diff --git a/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsComponent.java b/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsComponent.java index 769a509..00801ab 100644 --- a/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsComponent.java +++ b/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsComponent.java @@ -56,6 +56,8 @@ public class ApiSettingsComponent { + "
Specifies absolute path of python executable."; private final static String pipPathLabel = "Pip > Executable: Path" + "
Specifies absolute path of pip executable."; + private final static String uvPathLabel = "uv > Executable: Path" + + "
Specifies absolute path of uv executable."; private final static String usePython2Label = "Python > Executable: Version" + "
Specifies if using python 2.x."; private final static String usePythonVirtualEnvLabel = "Python > Virtual Environment" @@ -106,6 +108,7 @@ public class ApiSettingsComponent { private final JBCheckBox goMatchManifestVersionsCheck; private final TextFieldWithBrowseButton pythonPathText; private final TextFieldWithBrowseButton pipPathText; + private final TextFieldWithBrowseButton uvPathText; private final JBCheckBox usePython2Check; private final JBCheckBox usePythonVirtualEnvCheck; private final JBCheckBox pythonInstallBestEffortsCheck; @@ -200,6 +203,13 @@ public ApiSettingsComponent() { TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT ); + uvPathText = new TextFieldWithBrowseButton(); + uvPathText.addBrowseFolderListener( + null, + FileChooserDescriptorFactory.singleFile(), + TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT + ); + usePython2Check = new JBCheckBox("Use python 2.x"); usePythonVirtualEnvCheck = new JBCheckBox("Use python virtual environment"); @@ -308,6 +318,8 @@ public ApiSettingsComponent() { .addVerticalGap(10) .addLabeledComponent(new JBLabel(pipPathLabel), pipPathText, 1, true) .addVerticalGap(10) + .addLabeledComponent(new JBLabel(uvPathLabel), uvPathText, 1, true) + .addVerticalGap(10) .addLabeledComponent(new JBLabel(usePython2Label), usePython2Check, 1, true) .addVerticalGap(10) .addLabeledComponent(new JBLabel(usePythonVirtualEnvLabel), usePythonVirtualEnvCheck, 1, true) @@ -459,6 +471,15 @@ public void setPipPathText(@NotNull String text) { pipPathText.setText(text); } + @NotNull + public String getUvPathText() { + return uvPathText.getText(); + } + + public void setUvPathText(@NotNull String text) { + uvPathText.setText(text); + } + public boolean getUsePython2Check() { return usePython2Check.isSelected(); } diff --git a/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsConfigurable.java b/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsConfigurable.java index 817d844..e973c3b 100644 --- a/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsConfigurable.java +++ b/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsConfigurable.java @@ -57,6 +57,7 @@ public boolean isModified() { modified |= settingsComponent.getGoMatchManifestVersionsCheck() != settings.goMatchManifestVersions; modified |= !settingsComponent.getPythonPathText().equals(settings.pythonPath); modified |= !settingsComponent.getPipPathText().equals(settings.pipPath); + modified |= !Objects.equals(settingsComponent.getUvPathText(), settings.uvPath); modified |= settingsComponent.getUsePython2Check() != settings.usePython2; modified |= settingsComponent.getUsePythonVirtualEnvCheck() != settings.usePythonVirtualEnv; modified |= settingsComponent.getPythonInstallBestEffortsCheck() != settings.pythonInstallBestEfforts; @@ -94,6 +95,7 @@ public void apply() { settings.goMatchManifestVersions = settingsComponent.getGoMatchManifestVersionsCheck(); settings.pythonPath = settingsComponent.getPythonPathText(); settings.pipPath = settingsComponent.getPipPathText(); + settings.uvPath = settingsComponent.getUvPathText(); settings.usePython2 = settingsComponent.getUsePython2Check(); settings.usePythonVirtualEnv = settingsComponent.getUsePythonVirtualEnvCheck(); settings.pythonInstallBestEfforts = settingsComponent.getPythonInstallBestEffortsCheck(); @@ -160,6 +162,7 @@ public void reset() { settingsComponent.setGoMatchManifestVersionsCheck(settings.goMatchManifestVersions); settingsComponent.setPythonPathText(settings.pythonPath != null ? settings.pythonPath : ""); settingsComponent.setPipPathText(settings.pipPath != null ? settings.pipPath : ""); + settingsComponent.setUvPathText(settings.uvPath != null ? settings.uvPath : ""); settingsComponent.setUsePython2Check(settings.usePython2); settingsComponent.setUsePythonVirtualEnvCheck(settings.usePythonVirtualEnv); settingsComponent.setPythonInstallBestEffortsCheck(settings.pythonInstallBestEfforts); diff --git a/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsState.java b/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsState.java index c9bea11..66f68ab 100644 --- a/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsState.java +++ b/src/main/java/org/jboss/tools/intellij/settings/ApiSettingsState.java @@ -49,6 +49,7 @@ public final class ApiSettingsState implements PersistentStateComponent Date: Thu, 30 Apr 2026 11:25:43 +0300 Subject: [PATCH 2/2] docs: add uv path to README and bump java client to 0.0.17 (TC-3860) Document the new TRUSTIFY_DA_UV_PATH setting in the Python configuration section and system properties list. Update trustify-da-java-client from 0.0.17-SNAPSHOT to released 0.0.17. Co-Authored-By: Claude Opus 4.6 --- README.md | 3 +++ gradle/libs.versions.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6740382..4d6d7b0 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,8 @@ according to your preferences.
Set the full paths of the Python and the package installer for Python executables, which allows Exhort to locate and run the `pip3` commands to resolve dependencies for Python projects.
Python 2 executables `python` and `pip` can be used instead, if the `Use python 2.x` option is selected. +
Optionally, set the full path of the `uv` executable, which allows Exhort to use `uv` as the package resolver + for Python projects.
If the paths are not provided, your IDE's `PATH` environment will be used to locate the executables.
When option `Strictly match package version` is selected, the resolved dependency versions will be compared to the versions specified in the manifest file, and users will be alerted if any mismatch is detected. @@ -204,6 +206,7 @@ according to your preferences. * `TRUSTIFY_DA_DOCKER_PATH` : Specify the absolute path of `docker` executable. * `TRUSTIFY_DA_PODMAN_PATH` : Specify the absolute path of `podman` executable. * `TRUSTIFY_DA_IMAGE_PLATFORM` : Specify the platform used for multi-arch images. + * `TRUSTIFY_DA_UV_PATH` : Specify the absolute path of `uv` executable. * `TRUSTIFY_DA_MVN_USER_SETTINGS` : Specify the absolute path to the Maven user settings file. * `TRUSTIFY_DA_MVN_LOCAL_REPO` : Specify the absolute path to the Maven local repository. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6cc7c5b..f28bd72 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ caffeine = "3.1.8" commons-compress = "1.21" commons-io = "2.16.1" trustify-da-api-spec = "2.0.7" -trustify-da-java-client = "0.0.17-SNAPSHOT" +trustify-da-java-client = "0.0.17" github-api = "1.314" junit = "4.13.2" mockito = "5.14.2"