apache / apache/maven-javadoc-plugin
Issues with directories that have a comma in them
- Dominant language
- Java
- Stars
- 107
- Forks
- 116
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 16
Description
### Affected version
3.11.2
### Bug description
I noticed that if a directory name has a `,` in it when the `options` file is generated the `-d` is split thus causing a failure.
For example:
`/my,directory/my-project/my-module`
Results in an option file that looks like
```
-sourcepath
'/my,directory/my-project/my-module/target/generated-sources/annotations'
-author
-bottom
'Copyright © 2025. All rights reserved.'
-charset
'UTF-8'
-d
'/my,
directory/my-project/my-module/target/reports/apidocs'
-docencoding
'UTF-8'
-doctitle
'my-module 3.5.0-SNAPSHOT API'
-use
-version
-windowtitle
'my-module 3.5.0-SNAPSHOT API'
```
Thus it fails with:
```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.11.2:jar (attach-javadocs) on project sample-domain-model: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 2
[ERROR] error: Illegal package name: ",directory/my-project/my-module/target/reports/apidocs"
[ERROR] 1 error
[ERROR] Command line was: javadoc -J-Duser.language= -J-Duser.country= @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/my,directory/my-project/my-module/target/reports/apidocs' dir.
[ERROR]
[ERROR] -> [Help 1]
```
My configuration is as follows:
```
org.apache.maven.plugins
maven-javadoc-plugin
${maven.javadoc.plugin.version}
attach-javadocs
jar
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with the Maven Javadoc Plugin 3.11.2 configuration shown, using a project directory containing a comma. Inspect the generated javadoc options file and compare the -d path with the original directory; done means the path remains intact and the javadoc:jar execution succeeds.
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
- 45/100