No. I can not.
| | | mingleizhang | | 邮箱:18717838...@163.com | | 在2017年09月28日 13:14,Guang Chao 写道: On Thu, Sep 28, 2017 at 9:14 AM, mingleizhang <zml13856086...@163.com> wrote: > The actual thing is I can not modify the pom in parent. That is my issue. > > > > > Can you try to put in exclusions section of dependencies in child pom if it will work? > > > > > At 2017-09-28 09:03:38, "Guang Chao" <guang.chao.1...@gmail.com> wrote: > >On Mon, Sep 25, 2017 at 2:38 AM, Anders Hammar <and...@hammar.net> wrote: > > > >> The solution to this is to NOT have dependencies declared in a parent > pom. > >> I know some want to do that to simplify in the projects inheriting, but > >> this is the downside of doing that. There is no way to fix this but to > fix > >> the parent pom. > >> > >> > >Maybe just put the version in the parent POM as property, then declare the > >dependency on the child POM. That way, the consistency is preserved which > >is same version for all POM. > > > > > >> /Anders > >> > >> On Sun, Sep 24, 2017 at 1:18 PM, mingleizhang <zml13856086...@163.com> > >> wrote: > >> > >> > Hello, Maven Experts here. > >> > > >> > > >> > As the subject said, how to exclude artifacts inherited from > a > >> > parent POM ? Why did I ask this question as I used mvn > >> dependency:analyze > >> > to find which dependency is unnecessary. And I found the following. > All > >> of > >> > them from the parent pom. And I can not exclude them like a normal > way. > >> > Does anyone improve my mind here ? Thanks in advance. > >> > > >> > > >> > Unused declared dependencies found: > >> > [WARNING] org.apache.flink:force-shading:jar:1.4-SNAPSHOT:compile > >> > [WARNING] org.powermock:powermock-module-junit4:jar:1.6.5:test > >> > [WARNING] com.google.code.findbugs:jsr305:jar:1.3.9:compile > >> > [WARNING] log4j:log4j:jar:1.2.17:test > >> > [WARNING] org.powermock:powermock-api-mockito:jar:1.6.5:test > >> > [WARNING] org.slf4j:slf4j-log4j12:jar:1.7.7:test > >> > > >> > > >> > Cheers > >> > Rice > >> > > > > > > > >-- > >Guang <http://grails.asia/two-dimensional-string-array-in-java/> > -- Guang <http://grails.asia/byte-array-to-string-in-java/>