[MNG-5818] Disallow plugins from programmatically adding dependencies to projects
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[Jason van Zyl](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jvanzyl)** opened **[MNG-5818](https://issues.apache.org/jira/browse/MNG-5818?redirect=false)** and commented
MavenProject.setDependencyArtifacts(deps) is publicly available to plugins that can alter the classpath non-declaratively. For compatibility reasons in MNG-4363 we restored this capability for the cobertura-maven-plugin but it needs to be removed. It causes some nasty logic in the core, but it being non-delclarative and magical is the real problem.
We need to deprecate MavenProject.setDependencyArtifacts(deps), and replace the logic for constructing the artifacts in a better. Preferably passing in the artifacts in the constructor of MavenProject.
---
0 votes, 5 watchers
Contributor guide
Assessment
This issue has not been assessed yet.