apache / apache/maven-javadoc-plugin

[MJAVADOC-329] Allow generation of empty Javadoc JARs

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

Description

**[Vincent Massol](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=vmassol)** opened **[MJAVADOC-329](https://issues.apache.org/jira/browse/MJAVADOC-329?redirect=false)** and commented

Here's my use case:

* I want to be able to deploy my artifacts to Maven Central. There's a requirement that a javadoc jar exists for the arifact to deploy
* However I have some maven modules of type packaging = jar that have java files but these files are located in an "internal" package (internal api that we don't expose to end users since it's not part of our public API contract) which we exclude from the javadoc generation

The problem is that the javadoc plugin doesn't generate any JAR if there are no java files matching (even if I have other files such as a package.html file in my src/main/javadoc/* directories).

I'd like it to be possible to generate an "empty" javadoc JAR containing only a package.html file for example.

Thanks a lot

---

**Affects:** 2.8

**Remote Links:**
- [GitHub Pull Request #331
](https://github.com/apache/maven-javadoc-plugin/pull/331)
- [GitHub Pull Request #65
](https://github.com/apache/maven-javadoc-plugin/pull/65)

2 votes, 6 watchers

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the Maven Javadoc plugin behavior when no Java files match, then inspect the linked pull requests #331 and #65 for prior implementation context. Done means an empty Javadoc JAR can be generated for a module while retaining files such as package.html.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.