You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The XPath expression won't find any invalid dependency type in valid POM files, since the tag dependency must be wrapped inside a dependencies. That means, that //dependencyManagement/dependency doesn't match. It should be //dependencyManagement/dependencies/dependency instead.
Affects PMD Version: any
Rule: InvalidDependencyTypes
Description:
The XPath expression won't find any invalid dependency type in valid POM files, since the tag
dependency
must be wrapped inside adependencies
. That means, that//dependencyManagement/dependency
doesn't match. It should be//dependencyManagement/dependencies/dependency
instead.Also note, that maven supports new types via extensions (https://maven.apache.org/pom.html#Dependencies).
Current list of out-of-the box supported types: https://maven.apache.org/ref/3.9.0/maven-core/artifact-handlers.html
Code Sample demonstrating the issue:
Expected outcome:
PMD should report a violation at line 13, but doesn't. This is a false-negative.
Running PMD through: CLI
The text was updated successfully, but these errors were encountered: