Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 397990 - [CBI] Extra file package.html is being included in cbi produced jars
Summary: [CBI] Extra file package.html is being included in cbi produced jars
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 4.3   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.3 M6   Edit
Assignee: Platform-Releng-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-11 11:10 EST by Thanh Ha CLA
Modified: 2013-05-24 09:26 EDT (History)
5 users (show)

See Also:


Attachments
CBI org.eclipse.osgi jar contents (54.68 KB, text/x-log)
2013-03-04 13:55 EST, Thanh Ha CLA
no flags Details
PDE org.eclipse.osgi jar contents (53.89 KB, text/x-log)
2013-03-04 13:56 EST, Thanh Ha CLA
no flags Details
parent.patch (528 bytes, patch)
2013-03-04 15:06 EST, Thanh Ha CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thanh Ha CLA 2013-01-11 11:10:59 EST
In many of the jars produced by CBI there is an extra file package.html that is being included which are not included in PDE.
Comment 1 Jan Sievers CLA 2013-03-04 13:46:27 EST
concrete examples?
Comment 2 Thanh Ha CLA 2013-03-04 13:55:58 EST
Created attachment 227896 [details]
CBI org.eclipse.osgi jar contents
Comment 3 Thanh Ha CLA 2013-03-04 13:56:20 EST
Created attachment 227897 [details]
PDE org.eclipse.osgi jar contents
Comment 4 Thanh Ha CLA 2013-03-04 13:58:19 EST
Attached 2 texts containing the contents of the jar files for PDE and CBI builds for org.eclipse.osgi.

In the CBI case we see several package.html files which don't exist in the PDE jar.

$ grep package.html /tmp/cbi-osgi-jar.log
  inflating: org/eclipse/osgi/framework/log/package.html  
  inflating: org/eclipse/osgi/framework/eventmgr/package.html  
  inflating: org/eclipse/osgi/framework/console/package.html  
  inflating: org/eclipse/osgi/launch/package.html  
  inflating: org/eclipse/osgi/util/package.html  
  inflating: org/eclipse/osgi/storagemanager/package.html  
  inflating: org/eclipse/osgi/service/resolver/package.html  
  inflating: org/eclipse/osgi/service/datalocation/package.html  
  inflating: org/eclipse/osgi/service/runnable/package.html  
  inflating: org/eclipse/osgi/service/localization/package.html  
  inflating: org/eclipse/osgi/service/security/package.html  
  inflating: org/eclipse/osgi/service/environment/package.html  
  inflating: org/eclipse/osgi/service/debug/package.html  
  inflating: org/eclipse/osgi/signedcontent/package.html  
  inflating: org/eclipse/core/runtime/adaptor/package.html
Comment 5 Jan Sievers CLA 2013-03-04 14:57:20 EST
(In reply to comment #4)
> In the CBI case we see several package.html files which don't exist in the
> PDE jar.
> 
> $ grep package.html /tmp/cbi-osgi-jar.log
>   inflating: org/eclipse/osgi/framework/log/package.html  
>   inflating: org/eclipse/osgi/framework/eventmgr/package.html  
>   inflating: org/eclipse/osgi/framework/console/package.html  
>   inflating: org/eclipse/osgi/launch/package.html  
>   inflating: org/eclipse/osgi/util/package.html  

the package.html files are there in the source folders, see [1] for example.
By default all non-java files are copied over to the binary folder as resources by the tycho compiler plugin.
I think that package.html is somehow a corner case since it qualifies as java "source" for javadoc. Starting from java 5, package-info.java [2] can be used instead (which would not be copied over).

That said, you can always configure package.html to be excluded from resources being copied [3]:

<plugin>
 <groupId>org.eclipse.tycho</groupId>
 <artifactId>tycho-compiler-plugin</artifactId>
 <version>${tycho-version}</version>
 <configuration>
  <excludeResources>
   <exclude>**/package.html</exclude>   
  </excludeResources>
 </configuration>
</plugin>

[1] http://git.eclipse.org/c/equinox/rt.equinox.framework.git/tree/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/util
[2] http://stackoverflow.com/questions/3644726/javadoc-package-html-or-package-info-java
[3] http://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#excludeResources
Comment 6 Thanh Ha CLA 2013-03-04 15:06:34 EST
Created attachment 227904 [details]
parent.patch

Patch for eclipse-platform-parent/pom.xml to exclude package.html from jars.

Still needs testing.