> Gesendet: Donnerstag, 08. Oktober 2015 um 06:36 Uhr > Von: "Igor Fedorenko" <i...@ifedorenko.com> > An: dev@maven.apache.org > Betreff: Re: Dependencies in Dep Mngt without version > > I believe MNG-5727 is a different issue. Here you have unused invalid > <dependencyManagement> element. I don't have strong opinion if such > elements should cause build failure or ignored.
They cause a problem when the very same dependency is a transitive one and the dpmgt section is read/compared. As in MDEP. I would at least expect a warning. Anyone else? Michael > On Wed, Oct 7, 2015, at 05:24 PM, Michael Osipov wrote: > > Hi folks, > > > > I am currently trying to fix MDEP-506 [1]. > > > > The core problem is that a POM has a dep in dep mngt without version and > > that dependency is never referenced. Unfortunately, that build succeeds > > though the POM is invalid. > > > > I have done some digging and found > > DefaultModelBuilder#importDependencyManagement. The faulty dependency is > > skipped because it is neither type pom nor import [2]. That would make > > the build fail in the first place. > > > > After all that the DefaultModelValidator#validateEffectiveDependency > > method kicks in and validates the dependency elements but explicitly > > excludes deps from dep mngt from version validation [3]. > > > > Can someone tell me why? It does not feel right. > > > > An issue was raised and committed but not resolved [4]. > > > > Michael > > > > [1] https://issues.apache.org/jira/browse/MDEP-506 > > [2] > > https://github.com/apache/maven/blob/bd87258629db8e3fcc7aa04777afc16314c3cde0/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java#L1100-L1107 > > [3] > > https://github.com/apache/maven/blob/7badeb5b5bdfb48dd3c9533d224418d0648b76ce/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java#L559#L565 > > [4] https://issues.apache.org/jira/browse/MNG-5727 > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > > For additional commands, e-mail: dev-h...@maven.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org