Mailing List Archive

Warnings from gradle rat task
Hi all,

When running `./gradlew check` against the latest master I get a whole bunch of output messages like this:

> Task :lucene:analysis:smartcn:rat
Trying to override old definition of task javadoc

> Task :lucene:analysis:stempel:rat
Trying to override old definition of task javadoc

> Task :lucene:analysis:common:rat
Trying to override old definition of task javadoc

I don’t think it’s breaking anything but it’s a bit disconcerting. Maybe something to do with a gradle upgrade?

- Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Warnings from gradle rat task [ In reply to ]
I am 99.9% sure this warning comes from ant (we use ant's rat task)
somewhere - not gradle... It looks like loading rat's task defs overrides
ant's built-in javadoc for some reason - you can see it if you modify
rat-sources.gradle:

def generateReport(File reportFile) {
// Set up ant rat task.
logger.lifecycle("Before.")
def ratClasspath = project.rootProject.configurations.ratDeps.asPath
ant.taskdef(resource: 'org/apache/rat/anttasks/antlib.xml',
classpath: ratClasspath)
logger.lifecycle("after.")

the warning will be right there in between...

D.

On Thu, Nov 25, 2021 at 3:37 PM Alan Woodward <romseygeek@gmail.com> wrote:

> Hi all,
>
> When running `./gradlew check` against the latest master I get a whole
> bunch of output messages like this:
>
> > Task :lucene:analysis:smartcn:rat
> Trying to override old definition of task javadoc
>
> > Task :lucene:analysis:stempel:rat
> Trying to override old definition of task javadoc
>
> > Task :lucene:analysis:common:rat
> Trying to override old definition of task javadoc
>
> I don’t think it’s breaking anything but it’s a bit disconcerting. Maybe
> something to do with a gradle upgrade?
>
> - Alan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
Re: Warnings from gradle rat task [ In reply to ]
Alan - 1029651d121 on main.
D.

On Thu, Nov 25, 2021 at 4:21 PM Dawid Weiss <dawid.weiss@gmail.com> wrote:

>
> I am 99.9% sure this warning comes from ant (we use ant's rat task)
> somewhere - not gradle... It looks like loading rat's task defs overrides
> ant's built-in javadoc for some reason - you can see it if you modify
> rat-sources.gradle:
>
> def generateReport(File reportFile) {
> // Set up ant rat task.
> logger.lifecycle("Before.")
> def ratClasspath =
> project.rootProject.configurations.ratDeps.asPath
> ant.taskdef(resource: 'org/apache/rat/anttasks/antlib.xml',
> classpath: ratClasspath)
> logger.lifecycle("after.")
>
> the warning will be right there in between...
>
> D.
>
> On Thu, Nov 25, 2021 at 3:37 PM Alan Woodward <romseygeek@gmail.com>
> wrote:
>
>> Hi all,
>>
>> When running `./gradlew check` against the latest master I get a whole
>> bunch of output messages like this:
>>
>> > Task :lucene:analysis:smartcn:rat
>> Trying to override old definition of task javadoc
>>
>> > Task :lucene:analysis:stempel:rat
>> Trying to override old definition of task javadoc
>>
>> > Task :lucene:analysis:common:rat
>> Trying to override old definition of task javadoc
>>
>> I don’t think it’s breaking anything but it’s a bit disconcerting. Maybe
>> something to do with a gradle upgrade?
>>
>> - Alan
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>>
Re: Warnings from gradle rat task [ In reply to ]
________________________________
From: Dawid Weiss <dawid.weiss@gmail.com>
Sent: Friday, November 26, 2021 5:40 AM
To: Lucene Dev <dev@lucene.apache.org>
Subject: Re: Warnings from gradle rat task


Alan - 1029651d121 on main.
D.

On Thu, Nov 25, 2021 at 4:21 PM Dawid Weiss <dawid.weiss@gmail.com<mailto:dawid.weiss@gmail.com>> wrote:

I am 99.9% sure this warning comes from ant (we use ant's rat task) somewhere - not gradle... It looks like loading rat's task defs overrides ant's built-in javadoc for some reason - you can see it if you modify rat-sources.gradle:

def generateReport(File reportFile) {
// Set up ant rat task.
logger.lifecycle("Before.")
def ratClasspath = project.rootProject.configurations.ratDeps.asPath
ant.taskdef(resource: 'org/apache/rat/anttasks/antlib.xml', classpath: ratClasspath)


logger.lifecycle("after.")

the warning will be right there in between...

D.

On Thu, Nov 25, 2021 at 3:37 PM Alan Woodward <romseygeek@gmail.com<mailto:romseygeek@gmail.com>> wrote:
Hi all,

When running `./gradlew check` against the latest master I get a whole bunch of output messages like this:

> Task :lucene:analysis:smartcn:rat
Trying to override old definition of task javadoc

> Task :lucene:analysis:stempel:rat
Trying to override old definition of task javadoc

> Task :lucene:analysis:common:rat
Trying to override old definition of task javadoc

I don?t think it?s breaking anything but it?s a bit disconcerting. Maybe something to do with a gradle upgrade?

- Alan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org<mailto:dev-unsubscribe@lucene.apache.org>
For additional commands, e-mail: dev-help@lucene.apache.org<mailto:dev-help@lucene.apache.org>
Re: Warnings from gradle rat task [ In reply to ]
>
> MG>I suspect you have an ancient javadoc binary in classpath
> MG>but there is no way of knowing without looking at contents of antlib.xml
>
>
Looking at ant code it seems like it tried to reload tasks for some
reason and class loaders are different hence the warning. We don't have
javadoc on classpath - gradle does. I suspect it isolates tasks from each
other somehow... not really worth looking that deep into, I guess.

D.
Re: Warnings from gradle rat task [ In reply to ]
On Sat, Nov 27, 2021 at 9:48 AM Dawid Weiss <dawid.weiss@gmail.com> wrote:

> MG>I suspect you have an ancient javadoc binary in classpath
>> MG>but there is no way of knowing without looking at contents of
>> antlib.xml
>>
>>
> Looking at ant code it seems like it tried to reload tasks for some
> reason and class loaders are different hence the warning. We don't have
> javadoc on classpath - gradle does. I suspect it isolates tasks from each
> other somehow... not really worth looking that deep into, I guess.
>
> D.
>

I think I looked into using the gradle rat plugin when we were doing the
migrations but it was missing features. I filed an issue for them and I
think they fixed it since then but I never went back to check if that would
be enough for us to switch over. Maybe worth investigating, but also
possibly not worth the efforts.

Mike

>
Re: Warnings from gradle rat task [ In reply to ]
its been my experience gradle takes months to address these type of issues
can be quite frustrating since people seem to be pushing gradle as build-du-jour

martin-

________________________________
From: Mike Drob <mdrob@mdrob.com>
Sent: Saturday, November 27, 2021 11:20 AM
To: dev@lucene.apache.org <dev@lucene.apache.org>
Subject: Re: Warnings from gradle rat task



On Sat, Nov 27, 2021 at 9:48 AM Dawid Weiss <dawid.weiss@gmail.com<mailto:dawid.weiss@gmail.com>> wrote:
MG>I suspect you have an ancient javadoc binary in classpath
MG>but there is no way of knowing without looking at contents of antlib.xml

Looking at ant code it seems like it tried to reload tasks for some reason and class loaders are different hence the warning. We don't have javadoc on classpath - gradle does. I suspect it isolates tasks from each other somehow... not really worth looking that deep into, I guess.

D.

I think I looked into using the gradle rat plugin when we were doing the migrations but it was missing features. I filed an issue for them and I think they fixed it since then but I never went back to check if that would be enough for us to switch over. Maybe worth investigating, but also possibly not worth the efforts.

Mike