feat(ir): add typed builder for Maven@3#1122
Open
github-actions[bot] wants to merge 2 commits into
Open
Conversation
Add `maven::Maven` builder struct to `src/compile/ir/tasks/maven.rs`. The builder covers the most commonly used inputs for Maven@3: - `mavenPOMFile` (required positional) - Build: `goals`, `options` - JUnit results: `publishJUnitResults`, `testResultsFiles`, `testRunTitle`, `allowBrokenSymlinks` - Code coverage: `codeCoverageToolOption` (typed `CodeCoverageTool` enum), class/source filters, fail-if-empty - JDK: `jdkVersionOption` (typed `JdkVersion` enum), `jdkArchitectureOption` (typed `JdkArchitecture` enum) - Advanced: `mavenOptions`, `mavenAuthenticateFeed` - Code analysis: `checkStyleRunAnalysis`, `pmdRunAnalysis`, `spotBugsRunAnalysis` Typed enums (`CodeCoverageTool`, `JdkVersion`, `JdkArchitecture`) make constrained inputs unrepresentable with wrong values. 12 unit tests cover required inputs, all optional groups, enum ADO tokens, and absent-by-default behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
jamesadevine
approved these changes
Jun 21, 2026
Collaborator
|
@copilot resolve the merge conflicts in this pull request |
…lder-a084794e0c57a0ea Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Contributor
Done. The only conflict was in |
jamesadevine
approved these changes
Jun 23, 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
Adds a typed builder struct for
Maven@3to the ado-aw IR.Motivation
Previously, any code that needed to emit a Maven build step had to hand-craft
TaskStep::new("Maven@3", ...)with raw string input keys. This PR introducesa typed builder struct (
new(maven_pom_file)+ typed optional setters +into_step()) so the POM-file path is positional, all optional inputs andtheir constrained values are type-checked, and call sites stop using
stringly-typed keys.
Three typed enums make constrained values unrepresentable with wrong strings:
CodeCoverageTool—None | Cobertura | JaCoCoJdkVersion—Default | V21 | V17 | V11 | V10 | V9 | V8 | V7 | V6JdkArchitecture—X86 | X64 | Arm64Changes
src/compile/ir/tasks/maven.rs: newMavenbuilder struct with typed enumsand 12
#[cfg(test)]unit tests covering all input groupssrc/compile/ir/tasks/mod.rs:pub mod maven;declaration (alphabetical)ADO Task Reference
Maven@3mavenPOMFilegoals,options,publishJUnitResults,testResultsFiles,testRunTitle,allowBrokenSymlinks,codeCoverageToolOption,codeCoverageClassFilter,codeCoverageClassFilesDirectories,codeCoverageSourceDirectories,codeCoverageFailIfEmpty,codeCoverageRestoreOriginalPomXml,jdkVersionOption,jdkArchitectureOption,mavenOptions,mavenAuthenticateFeed,checkStyleRunAnalysis,pmdRunAnalysis,spotBugsRunAnalysisValidation
cargo build --all-targetscargo test— 12 new unit tests, all pass, no existing tests brokencargo clippy --all-targets --all-features --workspace -- -D warningsCreated by the ado-task-ir-contributor workflow.
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comspsprodweu4.vssps.visualstudio.comSee Network Configuration for more information.