You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2019/12/15 13:27:00 UTC

[jira] [Commented] (MSHADE-245) Add optional parameter "createJavadocJar"

    [ https://issues.apache.org/jira/browse/MSHADE-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16996725#comment-16996725 ] 

Elliotte Rusty Harold commented on MSHADE-245:
----------------------------------------------

I vote no on this one. It seems to stray too far afield from the purposes of shading. Shaded code really shouldn't be publishing its JavaDoc and encouraging people to depend on it in preference to the real artifact. It's an implementation and build time detail, not published API. 

Also there are other, more straightforward ways to generate an empty fake JAR as part of the build process if Sonatype needs that. Honestly, to me this sounds like a bug in the Sonatype repo system, and they're the ones that should fix this by not requiring source and javadoc jars. 

What do other folks think?

More thoughts on shading here: https://jlbp.dev/JLBP-18.html

> Add optional parameter "createJavadocJar"
> -----------------------------------------
>
>                 Key: MSHADE-245
>                 URL: https://issues.apache.org/jira/browse/MSHADE-245
>             Project: Maven Shade Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.4.3
>            Reporter: Fabrizio Cucci
>            Priority: Major
>
> According to [this|http://central.sonatype.org/pages/requirements.html#supply-javadoc-and-sources] Sonatype OSS requirement:
> bq. Projects with packaging other than pom have to supply JAR files that contain Javadoc and sources. ... If, for some reason (for example, license issue or it's a Scala project), you can not provide -sources.jar or -javadoc.jar , please make fake -sources.jar or -javadoc.jar with simple README inside to pass the checking.
> When repackaging some dependency, it's fairly easy to create the -source.jar artifact with the maven-shade-plugin through the *createSourcesJar* optional parameter. 
> It would be nice to let the plugin also generate the -javadoc.jar through an analogous optional parameter, e.g. *createJavadocJar*.
> So far, I couldn't find an easy way to achieve the above (i.e. aggregate the javadoc of all shaded dependencies) and I've opted for the workaround suggested by the OSS requirement (i.e. fake -javadoc.jar) in order to deploy my artifact on Maven Central.
> Please find my solution [here|https://github.com/fabriziocucci/yacl4j/tree/master/yacl4j-repackaged-jackson].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)