Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 34165

Summary: Manifest builder should keep build.properties and plugin.xml in sync or at least mark inconsistencies
Product: [Eclipse Project] PDE Reporter: Dejan Glozic <dejan>
Component: UIAssignee: Janek Lasocki-Biczysko <janek.lb>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P4 CC: cherie.wong, curtispd, Darin_Swanson, dj.houghton, eclipse, francois, heatherf, jean-michel_lemieux, jeffmcaffer, kim.moir, markus.kell.r, marshall.culpepper, mawanli, michaelvanmeekeren, mlists, n.a.edgar, pascal, pwebster, ryanman, sonia_dimitrov, wassim.melhem
Version: 2.1   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Dejan Glozic CLA 2003-03-07 18:53:31 EST
File build.properties has entries for the libraries that are listed in 
plugin.xml. Manifest builder should compare the two and report a warning when 
jar names are not the same.
Comment 1 Dejan Glozic CLA 2003-08-28 11:43:26 EDT
In the mean time, I learned that it is legal to list a library that is not 
listed in plugin.xml (for example, Update UI component builds the web 
application servlet jar that is not listed in plugin.xml). Therefore, I am not 
sure we can do this check without 'false alarms' (typos versus genuine JARs 
that are not and should not be listed in plugin.xml).

We can do a slightly different thing: flag the missing library entry in 
build.properties for each library specified in plugin.xml.
Comment 2 Wassim Melhem CLA 2004-10-26 04:05:54 EDT
*** Bug 75765 has been marked as a duplicate of this bug. ***
Comment 3 Wassim Melhem CLA 2005-02-28 02:17:18 EST
*** Bug 85268 has been marked as a duplicate of this bug. ***
Comment 4 Wassim Melhem CLA 2005-03-07 19:38:23 EST
From bug 75765:
"the name of the code jar for a plugin appears in two places, the 
plugin.xml/manifest.mf and the build.properties.  It would be good if there 
was 
a warning if the value in the manifest.mf does not have an entry in the 
build.properties.  

There will be cases where the jar is prebuilt so the build.propreties does not 
have a 
   source.foo.jar=
line.  In this case there are to possibilities.  Either is an over eager 
warning or PDE could be even more deluxe and check the expressions on the 
bin.includes line.  Typically it either has the jar name (third copy) or *.jar.

I just spent about 30 min trying to figure out why it worked fine when running 
self hosted but not when built and deployed (I got class not found exceptions 
everywhere so spent most of my time looking at plugin dependencies, resolved 
states, ...)"
Comment 5 Wassim Melhem CLA 2005-03-07 19:39:47 EST
From bug 85268:
"This morning's build failed due to an inconsistency between the plugin.xml and
build.properties files for the new plug-in org.eclipse.core.components.

The plugin.xml had:
   <runtime>
      <library name="components.jar">
         <export name="*"/>
      </library>
   </runtime>

but the build.properties had:
source.component.jar = src/
output.component.jar = bin/
bin.includes = plugin.xml,\
               component.jar,\
               about.html
src.includes = about.html

In the build.properties, all occurrences of "component" should have been
"components".

It would be nice if the PDE checker produced an error marker in this case."
Comment 6 Wassim Melhem CLA 2005-05-26 01:30:37 EDT
*** Bug 87275 has been marked as a duplicate of this bug. ***
Comment 7 Wassim Melhem CLA 2005-05-26 01:31:24 EDT
*** Bug 92913 has been marked as a duplicate of this bug. ***
Comment 8 Wassim Melhem CLA 2005-05-26 01:32:53 EDT
*** Bug 96000 has been marked as a duplicate of this bug. ***
Comment 9 Wassim Melhem CLA 2005-06-15 21:41:17 EDT
*** Bug 93454 has been marked as a duplicate of this bug. ***
Comment 10 Wassim Melhem CLA 2005-08-27 19:43:38 EDT
*** Bug 108198 has been marked as a duplicate of this bug. ***
Comment 11 Pascal Rapicault CLA 2005-11-01 14:13:44 EST
Ok, I think now it is about time to fix this problem!
Yesterday I and another person spent 1 hour (total 2 hours men) fixing up
various build.properties bugs spread across multiple projects (the output folder
was not consistent was not properly listed)
Today I and a few others spent 10 min (eq 50min men) again tracking another pb
where the name of the jar in the manifest was not in think with the
build.properties.

Overall I think this bug now deserve some attention.
Comment 12 Pascal Rapicault CLA 2005-11-01 15:03:03 EST
In fact the real requirement is not so much to have a mechanism to keep things
in sync automatically, but instead to have a mechanism that flags
inconsistencies between manifest.mf and build.properties.
Comment 13 Wassim Melhem CLA 2005-11-01 15:12:23 EST
that is correct.  that is why it is an enhancement.  It requires an additional 
PDE builder for properties files that can flag markers at the correct line 
etc.  It is a big piece of work.
Comment 14 Pascal Rapicault CLA 2005-11-01 17:33:15 EST
and a lot of people would be thanksfull if it was considered for 3.2, as the
mismatch between manifest.mf and build.properties causes errors on export that
are almost impossible to find if you are not from the pde team, and makes people
give up the usage of pde build to export their plug-ins.
Comment 15 Michael Van Meekeren CLA 2005-11-02 11:02:41 EST
+1
Comment 16 Jeff McAffer CLA 2005-11-08 21:48:53 EST
+1 and I'll even use one of my votes for it!
Comment 17 Pascal Rapicault CLA 2005-11-27 11:04:53 EST
Please, please, please.
Comment 18 Jean-Michel Lemieux CLA 2005-11-30 22:45:59 EST
+1

I just used my vote for this. Overall, problems with build.properties/manifest.mf/plugin.xml has been costing us too many headaches (I wasted 3 hours with various build issues today). The main problem is that everything is fine until you export (e.g. the build process finds them). 

Since problems in this area will cause the build to break, I think errors are good for fundamental problems (e.g. jar listed in manifest but not in properties, or missing properties, or icons should always be included in the output).
Comment 19 Nick Edgar CLA 2005-12-01 09:19:50 EST
I've heard comments equivalent to JML's from several people building RCP apps.
It works fine when they run under PDE, but when they export things are broken.
Comment 20 Wassim Melhem CLA 2006-01-16 15:52:24 EST
Assigning to JLB (not to be confused with JML).

Janek, please start with the parsing and matching keys/values with the correct line numbers.  Once that is done, we could add the semantic validation.
Comment 21 Janek Lasocki-Biczysko CLA 2006-01-19 12:01:08 EST
Added a validator for the build properties page, severity level can be controlled on the PDE compilers preferences page.
Comment 22 Nick Boldt CLA 2006-02-10 11:58:56 EST
When creating an EMF project, a plugin project is created which - prior to generation of model code - contains no build.properties file. After 3.2M4, I get the following error in my Error Log.

Error
2006-02-09 12:17:28.698
Resource /com.example.po/build.properties does not exist.

I turned off ALL the compiler messages under Window > Preferences > Plug-in Development > Compilers and I still get that error.

Downgrading it to Warning didn't work either - I always get an Error, regardless of the setting {Ignore, Warning, Error}.

Is this the way this preference is supposed to work? Is the absence of a build.properties file meant to throw an error, as opposed to having an invalid one?
Comment 23 Wassim Melhem CLA 2006-02-10 14:30:56 EST
re comment 22, what you are seeing is bug 126703 which has now been fixed.

Please so not reopen this bug and file separate bug reports instead if you see other problems with the validation.