Skip to content

chore: remove zt-exec dependency#24219

Merged
mcollovati merged 2 commits into
mainfrom
chore/remove-zeroturnaroun-dep
Apr 30, 2026
Merged

chore: remove zt-exec dependency#24219
mcollovati merged 2 commits into
mainfrom
chore/remove-zeroturnaroun-dep

Conversation

@mcollovati
Copy link
Copy Markdown
Collaborator

The Maven plugin used org.zeroturnaround:zt-exec to launch the Vite build process, adding an external dependency that had to be pinned on the plugin classpath.

Replace it with java.lang.ProcessBuilder, following the approach already used elsewhere in Flow for running external processes.

The Maven plugin used `org.zeroturnaround:zt-exec` to launch the
Vite build process, adding an external dependency that had to be
pinned on the plugin classpath.

Replace it with `java.lang.ProcessBuilder`, following the approach
already used elsewhere in Flow for running external processes.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Test Results

 1 394 files  ±0   1 394 suites  ±0   1h 15m 54s ⏱️ - 1m 19s
10 066 tests +1   9 996 ✅ +1  70 💤 ±0  0 ❌ ±0 
10 541 runs  +1  10 462 ✅ +1  79 💤 ±0  0 ❌ ±0 

Results for commit c27a9bd. ± Comparison against base commit 8450563.

♻️ This comment has been updated with latest results.

Collections.emptyMap(), "build");
}

// The declared TimeoutException is retained for source compatibility with
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't the throws be removed instead? It's a util class for our plugins

Runtime.getRuntime().addShutdownHook(shutdownHook);

StringBuilder toolOutput = new StringBuilder();
try (BufferedReader reader = new BufferedReader(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like a util method that either exists in Java or in Flow. Files.readAllLines if it is not important to print while reading, something else otherwise

After removing `zt-exec`, the Vite runner still declared
`throws TimeoutException` for source compatibility and drained the
process output with a manual `BufferedReader` loop. Neither is needed
for an internal plugin utility.

Drop the unused throws clause (and its multi-catch in
`BuildFrontendMojo`) and read the output via `Process.inputReader`
plus `BufferedReader.lines().forEach`.
@sonarqubecloud
Copy link
Copy Markdown

@mcollovati mcollovati added this pull request to the merge queue Apr 30, 2026
@mcollovati mcollovati added the target/25.0 Cherry-pick to 25.0 branch label Apr 30, 2026
Merged via the queue into main with commit f77f90d Apr 30, 2026
31 checks passed
@mcollovati mcollovati deleted the chore/remove-zeroturnaroun-dep branch April 30, 2026 11:29
@vaadin-bot
Copy link
Copy Markdown
Collaborator

Hi @mcollovati and @mcollovati, when i performed cherry-pick to this commit to 25.0, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick f77f90d
error: could not apply f77f90d... chore: remove zt-exec dependency (#24219)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

vaadin-bot added a commit that referenced this pull request Apr 30, 2026
This PR cherry-picks changes from the original PR #24219 to branch 25.1.
---
#### Original PR description
> The Maven plugin used `org.zeroturnaround:zt-exec` to launch the Vite
build process, adding an external dependency that had to be pinned on
the plugin classpath.
> 
> Replace it with `java.lang.ProcessBuilder`, following the approach
already used elsewhere in Flow for running external processes.
>

Co-authored-by: Marco Collovati <marco@vaadin.com>
Artur- pushed a commit that referenced this pull request May 1, 2026
The Maven plugin used `org.zeroturnaround:zt-exec` to launch the Vite
build process, adding an external dependency that had to be pinned on
the plugin classpath.

Replace it with `java.lang.ProcessBuilder`, following the approach
already used elsewhere in Flow for running external processes.
Artur- pushed a commit that referenced this pull request May 1, 2026
The Maven plugin used `org.zeroturnaround:zt-exec` to launch the Vite
build process, adding an external dependency that had to be pinned on
the plugin classpath.

Replace it with `java.lang.ProcessBuilder`, following the approach
already used elsewhere in Flow for running external processes.
Artur- pushed a commit that referenced this pull request May 1, 2026
The Maven plugin used `org.zeroturnaround:zt-exec` to launch the Vite
build process, adding an external dependency that had to be pinned on
the plugin classpath.

Replace it with `java.lang.ProcessBuilder`, following the approach
already used elsewhere in Flow for running external processes.
vaadin-bot added a commit that referenced this pull request May 1, 2026
… 24.9) (#24237)

This PR cherry-picks changes from the original PR #24224 to branch 24.9.
---
#### Original PR description
> The Maven plugin used `org.zeroturnaround:zt-exec` to launch the Vite
build process, adding an external dependency that had to be pinned on
the plugin classpath.
> 
> Replace it with `java.lang.ProcessBuilder`, following the approach
already used elsewhere in Flow for running external processes.

Co-authored-by: Marco Collovati <marco@vaadin.com>
vaadin-bot added a commit that referenced this pull request May 1, 2026
…23.6) (#24238)

This PR cherry-picks changes from the original PR #24228 to branch 23.6.
---
#### Original PR description
> The Maven plugin used `org.zeroturnaround:zt-exec` to launch the Vite
build process, adding an external dependency that had to be pinned on
the plugin classpath.
> 
> Replace it with `java.lang.ProcessBuilder`, following the approach
already used elsewhere in Flow for running external processes.

Co-authored-by: Marco Collovati <marco@vaadin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants