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

Carsten Ziegeler commented on SLING-8890:
-----------------------------------------

[~rombert] I agree, option 1 sounds like the right solution. We should probably 
take the api as the source of truth - if there are no java classes, then it is 
ok that sources has no java source and javadoc has no file. If the api has java 
classes, sources and javadoc must contain source files/javadoc.

> Exported packages with no java classes trigger API jars errors
> --------------------------------------------------------------
>
>                 Key: SLING-8890
>                 URL: https://issues.apache.org/jira/browse/SLING-8890
>             Project: Sling
>          Issue Type: Bug
>          Components: Maven Plugins and Archetypes
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: slingfeature-maven-plugin 1.1.12
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Assume that we have a bundle that exports a package which contains no java 
> classes.
> If these packages are part of the exported from an API region, when 
> generating the APIs jar, a warning is generated for each jar, since:
> - there are no java source files for the sources jar
> - there are no class file for the api jar
> - there are no javadoc files generated for the javadoc jar
> To my understanding, it is legal to export such packages, as importers will 
> have access to the resources included in those packages.
> I see a couple of ways out:
> 1. Track packages that contain only non-java resources. For these 
> specifically, update the checks as follows:
> - sources jar must contain files, but not java sources
> - api jar must contain files, but not java classes
> - javadoc jar must not contain any files
> 2. Skip checking for packages that only contain non-java resources. This is I 
> think wrong, as at development time you will need those resources.



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

Reply via email to