Javadoc URL Truncated at "allpackages-" if Project Contains 2 or more Packages
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 25
### What happened
# Works In Config
Netbeans 8.2
Oracle JDK 1.8.0_221
apache-maven-3.9.6
maven-javadoc-plugin:3.0.1
Window 10 Workstation
# Reporting Config
Apache Netbeans 25
OpenJDK 17.0.2
apache-maven-3.9.6
maven-javadoc-plugin:3.0.1
Window 10 Workstation
# Netbeans Project with Nested Packages Adds extra "\allpackages-" to Javadoc URL
If the **Generate Javadoc** tool is used on a project that contains **nested Java packages**, the URL shown in the Output Window to view the generated javadoc is truncated at the word "allpackages-". Please note that "\allpackages-" appears to be extraneous, given that it does not exist in the filesystem of the generated javadoc
## Output Window of Broken URL
Building index for all classes...
Generating C:\opt\javadoc\apidocs-17.0.0\allclasses-index.html...
Generating C:\opt\javadoc\apidocs-17.0.0\allpackages-index.html...
Generating C:\opt\javadoc\apidocs-17.0.0\index-all.html...
Generating C:\opt\javadoc\apidocs-17.0.0\overview-summary.html...
View Generated javadoc at C:\opt\javadoc\apidocs-17.0.0\allpackages-
Eight projects were tested in the category **multiple packages**. All eight produce the same incorrect URL, regardless of the number of characters in the path. Here are the Output Window URLs that indicate that "allpackages-" is shared among all failures.
View Generated javadoc at C:\opt\javadoc\apidocs-17.0.0\allpackages-
View Generated javadoc at C:\opt\javadoc\apidocs-17.401.60101\allpackages-
View Generated javadoc at C:\opt\javadoc\apidocs-17.0.0-SNAPSHOT\allpackages-
Please Note: The URL would work, if the URL did not include "\allpackages-"
# Netbeans Project with a Single Package
If the **Generate Javadoc** tool is used on a project that contains **a single Java package**, the URL shown in the Output Window to view the generated javadoc is correct, and clicking the link in the Output Window correctly displays the javadoc.
## Output Window of Functional URL
Building index for all classes...
Generating C:\opt\javadoc\apidocs-17.0.0\allclasses-index.html...
Generating C:\opt\javadoc\apidocs-17.0.0\allpackages-index.html...
Generating C:\opt\javadoc\apidocs-17.0.0\index-all.html...
Generating C:\opt\javadoc\apidocs-17.0.0\index.html...
View Generated javadoc at C:\opt\javadoc\apidocs-17.0.0\ (correct URL)
Eight projects were tested in the category **single package project**. All eight produce the correct URL, regardless of the number of characters in the path. Here are the Output Window URLs that click to javadoc.
View Generated javadoc at C:\opt\javadoc\apidocs-17.0.0
View Generated javadoc at C:\opt\javadoc\apidocs-17.0.0-SNAPSHOT
View Generated javadoc at C:\opt\javadoc\apidocs-17.401.60076
### Language / Project Type / NetBeans Component
_No response_
### How to reproduce
Generate Javadoc for any project that defines nested packages.
### Did this work correctly in an earlier version?
Apache NetBeans 16 or earlier
### Operating System
Windows 10 Workstation
### JDK
JDK 17.0.2
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Reproduce the issue by using Generate Javadoc on a NetBeans project with nested packages, then inspect how the Output Window constructs the displayed URL. Compare it with the generated Javadoc path and verify that the completed URL points to the documentation root without the extraneous "allpackages-" segment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100