[
https://issues.apache.org/jira/browse/MNG-5818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17074636#comment-17074636
]
Elliotte Rusty Harold commented on MNG-5818:
--------------------------------------------
Why don't we try revising the maven-cobertura-plugin to not call this method.
That should give us a good idea of what we need to add to replace it. Simply
marking this deprecated without a safe replacement in place probably won't
nudge clients off this API.
> Disallow plugins from programmatically adding dependencies to projects
> ----------------------------------------------------------------------
>
> Key: MNG-5818
> URL: https://issues.apache.org/jira/browse/MNG-5818
> Project: Maven
> Issue Type: Task
> Reporter: Jason van Zyl
> Priority: Major
>
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)