Skip to content

Fix use wrapper mvn#699

Merged
attiasas merged 5 commits intojfrog:devfrom
attiasas:fix_use_wrapper_mvn
Mar 19, 2026
Merged

Fix use wrapper mvn#699
attiasas merged 5 commits intojfrog:devfrom
attiasas:fix_use_wrapper_mvn

Conversation

@attiasas
Copy link
Collaborator

Fix using wrapper for Maven dependency tree

NewMavenDepTreeManager was constructing a new DepTreeParams with only Server and DepsRepo, silently dropping UseWrapper (and UseIncludedBuilds). This meant RunMvnCmd always executed mvn even when the project uses a Maven wrapper (./mvnw), causing failures on systems without a global Maven installation.

The fix passes the full params object to NewDepTreeManager so all fields are preserved.

Changes

  • sca/bom/buildinfo/technologies/java/mvn.go: Pass the original params to NewDepTreeManager instead of constructing a partial copy with only Server and DepsRepo.
  • sca/bom/buildinfo/technologies/java/mvn_test.go:
    • Add TestNewMavenDepTreeManagerPreservesAllParams — unit test verifying all DepTreeParams fields propagate correctly through the constructor.
    • Update TestMavenWrapperTrees to pass UseWrapper: true so it actually exercises the ./mvnw code path.
    • Update TestDepTreeWithDedicatedCache to pass UseWrapper: true since it also uses the wrapper test project.

  • The pull request is targeting the dev branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....
  • All static analysis checks passed.
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • Updated the Contributing page / ReadMe page / CI Workflow files if needed.
  • All changes are detailed at the description. if not already covered at JFrog Documentation, new documentation have been added.

@attiasas attiasas requested a review from a team March 17, 2026 16:24
@attiasas attiasas added bug Something isn't working safe to test Approve running integration tests on a pull request labels Mar 17, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Mar 17, 2026
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Mar 17, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Mar 17, 2026
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Mar 19, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Mar 19, 2026
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Mar 19, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Mar 19, 2026
@github-actions
Copy link

👍 Frogbot scanned this pull request and did not find any new security issues.


@attiasas attiasas merged commit 0d55734 into jfrog:dev Mar 19, 2026
62 checks passed
@attiasas attiasas deleted the fix_use_wrapper_mvn branch March 19, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants