Classpaths for inherited framework project dependencies

From: Bill Michell (bill.michel..bc.co.uk)
Date: Fri Sep 30 2005 - 07:06:02 EDT


I’m using WOLips 1.1.0.90 with Eclipse 3.1.0 under Windows XP.

 

I’m having fun with getting the framework dependencies added to the ant.frameworks.wo.wolocalroot or classpath.txt files…

 

Suppose I have FrameworkA, FrameworkB and Application projects open in my workspace.

 

FrameworkA has no dependencies.

 

FrameworkB is dependent on FrameworkA. I open the Java Build Path properties screen for FrameworkB and select the Projects tab. I specify that FrameworkA is a required project. I also go to the Order and Export tab and tick to export the FrameworkA, contributing it to dependent projects.

 

Eclipse/WOLips automatically and invisibly add FrameworkA to the Project References (so that build order is calculated correctly) and update the ant.frameworks.wo.wolocalroot file for FrameworkB, adding FrameworkA.

 

 

Application is dependent on FrameworkB. It has no explicit dependencies on FrameworkA. open the Java Build Path properties screen for Application and select the Projects tab. I specify that FrameworkB is a required project.

 

ant.frameworks.wo.wolocalroot gets updated with the FrameworkB dependency.

 

You can then Run or Debug the application from within the workbench. However, if you Install the application using ant, the classpath.txt file doesn’t get FrameworkA in it – so you get a runtime error if (or rather when) the FrameworkB components try to use classes from within FrameworkA.

 

 

Suppose instead you bite the bullet, and also add *all* the required frameworks to the WOFrameworks library. Then a number of bad things happen.

 

First, the frameworks get added to the ant.frameworks.wo.wolocalroot file multiple times. Second, if you try and run Eclipse on a clean machine (without the frameworks actually installed) the incremental builder dies horribly because it can’t find the required jars in the Local\Library\Frameworks folders. And third, you have to add the information in yet another place, which means it is easy for it to get out of synch.

 

And of course, if you simply add Local\Library\Frameworks\* then you can end up with unexpected collisions and dependencies – plus unnecessary memory usage.

 

 

I can’t use 1.1.0.102 because it causes problems with my EOModels when I Run from within the workbench (no EOEnterpriseObjects are returned by any query). And I’ll have fun trying to use the head of the CVS because I can’t use pserver from within my firewall – and because I don’t really want to upgrade to Eclipse 3.1.1 while it is still only a milestone release :-(

 

 

 

--
Bill Michell
Development Team Leader, Broadcast Platforms, BBC News Interactive.


http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received.
Further communication will signify your consent to this.



This archive was generated by hypermail 2.0.0 : Fri Sep 30 2005 - 07:06:09 EDT