Re: How to exclude artifacts inherited from a parent POM?

2017-09-29 Thread mingleizhang
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/;


Re: How to exclude artifacts inherited from a parent POM?

2017-09-29 Thread Anders Hammar
On Fri, Sep 29, 2017 at 8:00 AM, Guang Chao <guang.chao.1...@gmail.com>
wrote:

> On Thu, Sep 28, 2017 at 2:56 PM, Russell Gold <russell.g...@oracle.com>
> wrote:
>
> > What problem is caused by the superfluous dependencies?
> >
>
> I think he wants to get rid of the warnings.
>

There is no way but to remove those dependencies from the parent pom
itself. File a ticket on those managing it if you can't fix it yourself.

/Anders



>
>
> >
> > > On Sep 27, 2017, at 9:14 PM, mingleizhang <zml13856086...@163.com>
> > wrote:
> > >
> > > The actual thing is I can not modify the pom in parent. That is my
> issue.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 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/>
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>
>
> --
> Guang <http://grails.asia/java-5-for-loop-string-array/>
>


Re: How to exclude artifacts inherited from a parent POM?

2017-09-29 Thread Guang Chao
On Thu, Sep 28, 2017 at 2:56 PM, Russell Gold <russell.g...@oracle.com>
wrote:

> What problem is caused by the superfluous dependencies?
>

I think he wants to get rid of the warnings.


>
> > On Sep 27, 2017, at 9:14 PM, mingleizhang <zml13856086...@163.com>
> wrote:
> >
> > The actual thing is I can not modify the pom in parent. That is my issue.
> >
> >
> >
> >
> >
> >
> >
> >
> > 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/>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


-- 
Guang <http://grails.asia/java-5-for-loop-string-array/>


Re: How to exclude artifacts inherited from a parent POM?

2017-09-28 Thread Russell Gold
What problem is caused by the superfluous dependencies?

> On Sep 27, 2017, at 9:14 PM, mingleizhang <zml13856086...@163.com> wrote:
> 
> The actual thing is I can not modify the pom in parent. That is my issue.
> 
> 
> 
> 
> 
> 
> 
> 
> 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/>


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Re: How to exclude artifacts inherited from a parent POM?

2017-09-27 Thread 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/>


Re:Re: How to exclude artifacts inherited from a parent POM?

2017-09-27 Thread mingleizhang
The actual thing is I can not modify the pom in parent. That is my issue.








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/>


Re: How to exclude artifacts inherited from a parent POM?

2017-09-27 Thread Guang Chao
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/>


Re: How to exclude artifacts inherited from a parent POM?

2017-09-24 Thread Anders Hammar
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.

/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


How to exclude artifacts inherited from a parent POM?

2017-09-24 Thread mingleizhang
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