Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347267 - class files in source bundles
Summary: class files in source bundles
Status: CLOSED FIXED
Alias: None
Product: MoDisco
Classification: Modeling
Component: Infrastructure (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: 0.9.0 RC3   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 347309
Blocks: 347240
  Show dependency tree
 
Reported: 2011-05-26 04:32 EDT by Nicolas Bros CLA
Modified: 2011-08-18 08:26 EDT (History)
5 users (show)

See Also:
nicolas.bros: indigo+
Kenn.Hussey: pmc_approved+
gdupe: review+
fabien.giquel: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bros CLA 2011-05-26 04:32:38 EDT
from the report from Bug 347240

Java Bundles without a BREE:
org.eclipse.gmt.modisco.java.discoverer.source_0.9.0.v201105251101.jar
Comment 1 Nicolas Bros CLA 2011-05-26 08:22:06 EDT
In fact, the problem is not that there is no BREE in a source bundle (that is expected), but that the source bundle contains Java (compiled) classes.

I have looked for all ".class" in MoDisco source bundles:
ls -1 *modisco*source_* | while read i; do unzip -t $i; done | grep "\.class"

And I found the following:

org/eclipse/gmt/modisco/java/actions/DiscoverJ2se5ModelFromJavaProject$1.class
org/eclipse/gmt/modisco/java/actions/DiscoverJ2se5ModelFromJavaProject$2$1.class
org/eclipse/gmt/modisco/java/actions/DiscoverJ2se5ModelFromJavaProject$2.class
org/eclipse/gmt/modisco/java/actions/DiscoverJ2se5ModelFromJavaProject.class
org/eclipse/gmt/modisco/java/io/java/binding/BijectiveMap.class
org/eclipse/gmt/modisco/java/io/java/binding/Binding.class
org/eclipse/gmt/modisco/java/io/java/binding/BindingManager$PendingElement.class
org/eclipse/gmt/modisco/java/io/java/binding/BindingManager.class
org/eclipse/gmt/modisco/java/io/java/binding/ClassBinding.class
org/eclipse/gmt/modisco/java/io/java/binding/FeatureBinding.class
org/eclipse/gmt/modisco/java/io/java/binding/FieldBinding.class
org/eclipse/gmt/modisco/java/io/java/binding/IBindingFactory.class
org/eclipse/gmt/modisco/java/io/java/binding/JDTDelegateBindingFactory.class
org/eclipse/gmt/modisco/java/io/java/binding/MethodBinding.class
org/eclipse/gmt/modisco/java/io/java/binding/PackageBinding.class
org/eclipse/gmt/modisco/java/io/java/binding/ParameterBinding.class
org/eclipse/gmt/modisco/java/io/java/binding/UnresolvedBinding.class
org/eclipse/gmt/modisco/java/io/java/binding/VariableBinding.class
Comment 2 Nicolas Bros CLA 2011-05-26 08:30:14 EDT
I am not sure why these classes are exported in the source bundles.
But the org.eclipse.gmt.modisco.java.discoverer plug-in is special in 2 ways:
- the package names don't start with the bundle id
- the Manifest uses "Provide-Package" instead of "Export-Package"

So maybe one of these causes Buckminster (or PDE build called by Buckminster) to export some classes?
Comment 3 Nicolas Bros CLA 2011-05-26 09:09:49 EDT
I tried exporting the bundle locally to investigate the problem, but it makes my Eclipse crash (cf Bug 347309).
Comment 4 Nicolas Bros CLA 2011-05-27 06:28:00 EDT
I finally found the reason there were .class files in the source bundles : the classes really are present in the src/ folder! (I didn't see them at first because they are hidden in the Eclipse Package Explorer)

So the solution is simply to remove those .class files.
(I tried to attach a patch, but Eclipse won't include modifications to the .class)
Comment 5 Gregoire Dupe CLA 2011-05-27 09:38:32 EDT
Hello Kenn and Fabien,

This bug is caused by some ".class" files which have been committed in the MoDisco SVN. To solve this bug we just have to remove them.

I would like to do it for before RC3. The ".class" files are totally useless. This fix is then totally safe.

Do you agree to remove the ".class" files from the SVN.

Regards,
Gregoire Dupe
Comment 6 Nicolas Bros CLA 2011-05-27 11:33:09 EDT
I removed the classes in revision 4445.
Comment 7 Gregoire Dupe CLA 2011-06-16 12:05:41 EDT
I've checked the file org.eclipse.gmt.modisco.java.discoverer.source_0.9.0.v201106080847.jar: it does not contains any .class files.

This bug can be closed.
Comment 8 Hugo Bruneliere CLA 2011-08-18 08:26:15 EDT
Bug solved.