[
https://issues.apache.org/jira/browse/LUCENE-9201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17042900#comment-17042900
]
Tomoko Uchida edited comment on LUCENE-9201 at 2/23/20 11:11 AM:
-----------------------------------------------------------------
[~dweiss] I did some tests with the patch [^LUCENE-9201.patch] and noticed this
seems to cause an error with :solr:server project, where the {{java-libarry}}
plugin is applied but there is actually no Java source - hence no Javadocs
folder.
{code:java}
lucene-solr $ ./gradlew :solr:server:checkMissingDocs
> Task :solr:server:checkMissingDocsDefault FAILED
FAILURE: Build failed with an exception.
* Where:
Script '/mnt/hdd/repo/lucene-solr/gradle/validation/missing-docs-check.gradle'
line: 105
* What went wrong:
Execution failed for task ':solr:server:checkMissingDocsDefault'.
> Javadoc verification failed:
Traceback (most recent call last):
File "/mnt/hdd/repo/lucene-solr/dev-tools/scripts/checkJavaDocs.py", line
388, in <module>
if checkPackageSummaries(sys.argv[1], level):
File "/mnt/hdd/repo/lucene-solr/dev-tools/scripts/checkJavaDocs.py", line
351, in checkPackageSummaries
checkClassSummaries(root)
File "/mnt/hdd/repo/lucene-solr/dev-tools/scripts/checkJavaDocs.py", line
154, in checkClassSummaries
f = open(fullPath, encoding='UTF-8')
FileNotFoundError: [Errno 2] No such file or directory:
'/mnt/hdd/repo/lucene-solr/solr/server/build/docs/javadoc'
{code}
How can we properly exclude such irregular projects? This workaround works for
me, does this make sence...?
{code:java}
@TaskAction
def lint() {
- dirs.each { dir ->
+ //dirs.each { dir ->
+ dirs.findAll { it.exists() }.each { dir ->
project.logger.info("Checking for missing docs... (dir=${dir},
level=${level})")
checkMissingJavadocs(dir, level)
}
{code}
was (Author: tomoko uchida):
[~dweiss] I did some tests with the patch [^LUCENE-9201.patch] and noticed this
seems to cause an error with :solr:server project, where the {{java-libarry}}
plugin is applied but there is actually no Java source - hence no Javadocs
folder.
{code:java}
lucene-solr $ ./gradlew :solr:server:checkMissingDocs
> Task :solr:server:checkMissingDocsDefault FAILED
FAILURE: Build failed with an exception.
* Where:
Script '/mnt/hdd/repo/lucene-solr/gradle/validation/missing-docs-check.gradle'
line: 105
* What went wrong:
Execution failed for task ':solr:server:checkMissingDocsDefault'.
> Javadoc verification failed:
Traceback (most recent call last):
File "/mnt/hdd/repo/lucene-solr/dev-tools/scripts/checkJavaDocs.py", line
388, in <module>
if checkPackageSummaries(sys.argv[1], level):
File "/mnt/hdd/repo/lucene-solr/dev-tools/scripts/checkJavaDocs.py", line
351, in checkPackageSummaries
checkClassSummaries(root)
File "/mnt/hdd/repo/lucene-solr/dev-tools/scripts/checkJavaDocs.py", line
154, in checkClassSummaries
f = open(fullPath, encoding='UTF-8')
FileNotFoundError: [Errno 2] No such file or directory:
'/mnt/hdd/repo/lucene-solr/solr/server/build/docs/javadoc'
{code}
How can we properly exclude such irregular projects? This workaround works for
me, does this make sence...?
{code:java}
@TaskAction
def lint() {
- dirs.each { dir ->
+ //dirs.each { dir ->
+ dirs.findAll { project.file(it).exists() }.each { dir ->
project.logger.info("Checking for missing docs... (dir=${dir},
level=${level})")
checkMissingJavadocs(dir, level)
}
{code}
> Port documentation-lint task to Gradle build
> --------------------------------------------
>
> Key: LUCENE-9201
> URL: https://issues.apache.org/jira/browse/LUCENE-9201
> Project: Lucene - Core
> Issue Type: Sub-task
> Affects Versions: master (9.0)
> Reporter: Tomoko Uchida
> Assignee: Tomoko Uchida
> Priority: Major
> Attachments: LUCENE-9201-ecj-2.patch, LUCENE-9201-ecj.patch,
> LUCENE-9201.patch, javadocGRADLE.png, javadocHTML4.png, javadocHTML5.png
>
> Time Spent: 4h
> Remaining Estimate: 0h
>
> Ant build's "documentation-lint" target consists of those two sub targets.
> * "-ecj-javadoc-lint" (Javadoc linting by ECJ)
> * "-documentation-lint"(Missing javadocs / broken links check by python
> scripts)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]