Refactor Project Build Tools to Use NetBeans Toolkit APIs#335
Merged
stefanofornari merged 6 commits intoJul 3, 2026
Merged
Conversation
…sses to run maven so that there is no need to specify executables or build the command line. Similarly, it replaces direct XML manipulatioin for pom.xml in dealing with dependencies.
…sses to run maven so that there is no need to specify executables or build the command line. Similarly, it replaces direct XML manipulatioin for pom.xml in dealing with dependencies.
instead of running maven as an external command. This has several benefits: - no configuration - more secure because it does not execute blindly an external command - potentially extensible (or at least pattern) for any build system - no need to deal directly with command arguments - fewer tools, but not restricted to a few goals (do more with less)
external command
no need any more to provide it as project option.
jGauravGupta
approved these changes
Jun 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors the Maven and Gradle project build tools to use the NetBeans platform's native APIs (
org.netbeans.modules.maven.api.executeandorg.netbeans.modules.gradle.api.execute) instead of invoking external commands directly. This provides better integration, improved security, and removes the need for manual command-line configuration.Branch:
ste/ref/project_build_toolsBase Branch:
mainTotal Changes: 52 files changed, 1,878 insertions(+), 1,210 deletions(-)
Key Changes
1. Build System Integration (Commits: f624561, 55f7037, cdc3efa, 79b9211)
Maven Tools:
mvncommand execution withMavenCommandLineExecutorfrom NetBeans Maven APIrunMavenGoals()tool that accepts goals, profiles, and properties as parametersRunUtils.createRunConfig()to create proper Maven execution configurationsCaptureOutputInputOutpututilityGradle Tools:
gradlecommand execution withRunUtils.executeGradle()from NetBeans Gradle APIrunGradleTasks()tool for executing Gradle tasksNew Infrastructure:
CaptureOutputInputOutput- Utility class that wrapsInputOutputto capture stdout/stderr for build outputExecutionTools.java- No longer needed as build execution is now handled by project-specific toolsAbstractBuildTool- Base class for build tools with common functionality2. Tool Renaming for Clarity
All project-specific tools have been prefixed to avoid naming conflicts:
projectInfo->mavenProjectInfo/gradleProjectInfojdkVersion->mavenJdkVersion/gradleJdkVersionprojectDependencies->mavenProjectDependencies/gradleProjectDependenciesrunJavaClass->runMavenGoals/runGradleTasksbuildProject,testProject(replaced by more flexiblerunMavenGoals/runGradleTasks)3. UI Cleanup (Commit: da9084a)
Removed Project Configuration Fields:
JeddictAIPropertiesPanelBundle.propertiesto remove unused localization keys4. Dependency Updates
Added new dependencies in
pom.xml:org.netbeans.modules.gradleandorg.netbeans.modules.gradle-javaAPIsmockito-junit-jupiterfor testing5. Testing Infrastructure
Enhanced test coverage with:
DummyGradleConfigurationProvider,DummyProjectManager,DummyProjectSourcesMavenToolsTest,BuildToolsTest,HackerTest,CaptureOutputInputOutputTest, etc.Technical Benefits
Testing Notes
xvfb-runsetup for CI/CD is preserved from main branch