apache / apache/maven-javadoc-plugin

[MJAVADOC-718] <sourceFileExcludes> break when path to file starts with com/

Open
#1,107 8 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
107
Forks
116
Avg merge
1d 10h
Merged PRs (30d)
16

Description

**[Brian Mouncer](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER291052)** opened **[MJAVADOC-718](https://issues.apache.org/jira/browse/MJAVADOC-718?redirect=false)** and commented

I have "\" working in our build system, but we initially added our source code without the leading /com/ in the sources path.  This caused issues with the generated soueces.jar having a bad path in it, so we fixed our sources path to include the starting "/com/...". this fixed the path in sources.jar, but this seems to have broken \ in the javadocs plugin.

I know "sourceFileExcludes" was working before, as I can remove it or change the path slightly and javadocs throws errors on windows/linux about an android only httpclinet.java class we have, and using the correct sourceFileExcludes prevents javadocs from processing the android only source file and erroring out.

Then when I change to add our sources file to our pom.xml to now include the leading "/com/" in our sources path, then sourceFileExcludes stops working.  I have tested the exclude with both wild card paths "\**/HttpClient.java\" and full path "
\/com/microsoft/cognitiveservices/speech/util/HttpClient.java\".

both Wild card path and full qualified paths work when the source file in added to the pom.xml as "myclasspath/class.java" but both fail to exclude the files when the path is "com/myclasspath/class.java"...

                            \
                                \**/HttpClient.java\
                                \/com/microsoft/cognitiveservices/speech/util/HttpClient.java\
                            \
 

---

**Affects:** 3.0.1, 3.4.0

**Attachments:**
- [sourceFileExcludes_Bug_Repro.zip](https://issues.apache.org/jira/secure/attachment/13045175/sourceFileExcludes_Bug_Repro.zip) (_383.14 kB_)

**Issue Links:**
- [MJAVADOC-805](https://issues.apache.org/jira/browse/MJAVADOC-805) Improve documentation of \ parameter
(_**"causes"**_)
- [MJAVADOC-365](https://issues.apache.org/jira/browse/MJAVADOC-365) [Patch] sourceFileExcludes does not work due to inclusion of packages

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the attached sourceFileExcludes_Bug_Repro.zip and the Maven pom.xml configuration described in the report. Reproduce the behavior with source paths beginning with com/ and compare it with paths without that prefix, using both the wildcard and full-path exclusions. Done means sourceFileExcludes prevents the Android-only HttpClient.java file from being processed in both path forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.