maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John R Fallows (JIRA)" <j...@codehaus.org>
Subject [jira] (MJAVADOC-329) Allow generation of empty javadoc JARs
Date Sat, 07 Feb 2015 18:38:18 GMT

    [ https://jira.codehaus.org/browse/MJAVADOC-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=362747#comment-362747
] 

John R Fallows edited comment on MJAVADOC-329 at 2/7/15 12:37 PM:
------------------------------------------------------------------

The requirement for deployment to Maven Central via Sonatype is to always produce a javadoc
JAR, empty or otherwise.  If a project initially has only internal (excluded) packages and
therefore no javadoc JAR, the deployment fails.

One of the most straightforward solutions would be to include a boolean flag on the javadoc:jar
mojo such as "skipIfEmpty" and default to true for backwards compatibility.  Projects deploying
to Maven Central could simply configure "skipIfEmpty" to false.

The proposal to use assembly plugin could be made to work but creates churn on the POM as
the project evolves to include sources that require actual javadoc.



was (Author: jfallows):
The requirement for deployment to Maven Central is to always produce a javadoc JAR, empty
or otherwise.  If a project initially has only internal (excluded) packages and therefore
no javadoc JAR, the deployment fails.

One of the most straightforward solutions would be to include a boolean flag on the javadoc:jar
mojo such as "skipIfEmpty" and default to true for backwards compatibility.  Projects deploying
to Maven Central could simply configure "skipIfEmpty" to false.

The proposal to use assembly plugin could be made to work but creates churn on the POM as
the project evolves to include sources that require actual javadoc.


> Allow generation of empty javadoc JARs
> --------------------------------------
>
>                 Key: MJAVADOC-329
>                 URL: https://jira.codehaus.org/browse/MJAVADOC-329
>             Project: Maven Javadoc Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.8
>            Reporter: Vincent Massol
>
> 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



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message