maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé BOUTEMY <herve.bout...@free.fr>
Subject Re: svn commit: r1775971 - /maven/plugins/trunk/maven-pmd-plugin/pom.xml
Date Wed, 28 Dec 2016 21:50:27 GMT
Le mercredi 28 décembre 2016, 14:33:58 CET Robert Scholte a écrit :
> On Wed, 28 Dec 2016 11:47:40 +0100, Hervé BOUTEMY <herve.boutemy@free.fr>
> 
> wrote:
> > Le mardi 27 décembre 2016, 14:48:56 CET Robert Scholte a écrit :
> >> >> The fact right now is that if I add/change a test-scoped dependency,
> >> 
> >> it
> >> 
> >> >> could happen that the project won't run due to a missing transitive
> >> >> dependency.
> >> >> We are very, very lucky this doesn't happen that often.
> >> > 
> >> > This is what would stop if we would just fix those bugs. We are
> >> 
> >> running
> >> 
> >> > into those bugs ourselves. Take a look at the PMD plugin POM again.
> >> 
> >> What
> >> 
> >> > would you have done, if the test dependencies I moved to compile scope
> >> > would be required for compilation of that project?
> >> 
> >> With the current behavior I wouldn't include these dependencies at all,
> >> since they're already available as compile-scoped transitive dependency.
> >> When due to an upgrade of a dependency commons-io is not used anymore,
> >> tests will fail to compile. And that's the moment to add this
> >> dependency.
> >> IMO changing dependencies should never cause compilation failures caused
> >> by transitive dependencies, but right now there's simply no better
> >> solution. We say that it is a best practice to always define the direct
> >> dependencies, but in this case we can't do that because we cannot give
> >> these dependencies the test-scope.
> > 
> > notice that this seems to have been reported years ago:
> > https://issues.apache.org/jira/browse/MNG-5739
> > 
> > and IMHO, if this case was fixed (which seems reasonable), MNG-6135
> > would not
> > break so many plugins (which do not have really broken config: having to
> > avoid
> > a test scope dependency just because it will override a transitive
> > compile
> > dependency is just the trial and error configuration people will have to
> > do)
> 
> You fully hit the nail. Before MNG-6135 the resolution was working as
> expected, even though it may seem as a very simplified dependency
> resolution: only look at direct compile+runtime -scoped dependencies and
> their transitive deps. In fact, I like this concept in general: pick all
> direct dependencies matching one or more scopes and all their transitive
> dependencies.
> To me there are 2 solutions: either implement MNG-5739 or revert MNG-6135.
> Any of both solutions will make plugins again run as expected.
+1

> 
> Robert
> 
> > Regards,
> > 
> > Hervé
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message