feat(java): add support of `test` scope for `pom.xml` files
Description
We added support of test scope.
but we were forced to roll back these changes (see #7488).
This PR adds support of test scope.
Also this PR takes into account the problem with child dependencies of a test dependency(mark test deps and children of this dependency as Dev).
Blocker PR
- [ ] #7484. We should merge this PR first to avoid issues with long
pom.xmlfile scan times. (see https://github.com/aquasecurity/trivy/issues/7476#issue-2515513199).
Checklist
- [x] I've read the guidelines for contributing to this repository.
- [x] I've followed the conventions in the PR title.
- [x] I've added tests that prove my fix is effective or that my feature works.
- [ ] I've updated the documentation with the relevant information (if needed).
- [ ] I've added usage information (if the PR introduces new options)
- [ ] I've included a "before" and "after" example to the description (if the PR is a user interface change).
This PR is stale because it has been labeled with inactivity.
This PR is stale because it has been labeled with inactivity.
This PR is stale because it has been labeled with inactivity.
This PR is stale because it has been labeled with inactivity.
This PR is stale because it has been labeled with inactivity.
This PR is stale because it has been labeled with inactivity.
This PR is stale because it has been labeled with inactivity.