pedro-w commented on issue #1324: URL: https://github.com/apache/maven-javadoc-plugin/issues/1324#issuecomment-4914354440
I had a look at this. Starting here https://github.com/apache/maven-javadoc-plugin/blob/65b27eb323b79e123c5abad93469e04441935174/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L4973-L4982 it does the up-to-date check and, if not stale, creates the javadoc then writes out the "stale data" - this means the current state of all options, source files, target files etc. The up-to-date check checks the current state against whatever it last wrote out as "stale data" - if they are identical then it is up to date. Next, `getStaleData` is here https://github.com/apache/maven-javadoc-plugin/blob/65b27eb323b79e123c5abad93469e04441935174/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java#L47-L96 This is capturing the current state as I described above. On line 73 and following is the source path handling. It splits up the paths into individual paths, and walks each one to pull out the file names in subdirectories. These are then all added to the state with their time stamps. Unfortunately the function `walk` does not recursively check subdirs, only the toplevel. https://github.com/apache/maven-javadoc-plugin/blob/65b27eb323b79e123c5abad93469e04441935174/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java#L115-L125 The usual meaning of "walk" in the JDK is to recursively descend through the whole tree, e.g. `java.nio.files.Files.walk(...)` So, I think it's a bug: source files are not considered when determining if the task needs redoing, because function `org.apache.maven.plugins.javadoc.StaleHelper.walk` does not include the whole tree of files that make up the source dir. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
