Changes for page Create a WebObjects Framework
Last modified by Pascal Robert on 2007/12/15 18:15
From version 43.1
edited by Kieran Kelleher
on 2007/01/16 14:34
on 2007/01/16 14:34
Change comment:
There is no comment for this version
To version 42.1
edited by Kieran Kelleher
on 2007/01/16 14:24
on 2007/01/16 14:24
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,19 +1,17 @@ 1 1 === Introduction === 2 2 3 -So, you have built the mother of all WebObjects apps in XCode or Eclipse with everything in the default package (or not ;)). The time has come where you want a make a new WebObjects application that re-uses some of the functionality you have already created in bigApp.woa.4 -This article explains how to create a framework in Eclipse that can be used with your WebObjects projects. The resulting framework can be used in WOLips or XCode projects. In this example a framework is created that consists of class(es) that were in the default package of a WebObjects application and the 3rd party jar dependencies thatwere originally in /Library/WebObjects/Extensions. The resulting framework bundle will encompass the 3rd party jar and the custom java classes that are moved from the original WO project.5 -Disclaimer: I am still relatively new to Eclipse, so if you see a smarter way to do this, then feel free to edit this wiki page 3 +So, you have built the mother of all WebObjects apps in XCode or Eclipse with everything in the default package (or not). The time has come where you want a make a new WebObjects application that re-uses some of the functionality you have already created in bigApp.woa. 4 +This article explains how to create a framework in Eclipse that can be used with your WebObjects projects. The resulting framework can be used in WOLips or XCode projects. In this example a framework is created that consists of class(es) that were in the default package of a WebObjects application and the 3rd party jar dependencies were originally in /Library/WebObjects/Extensions. The resulting framework bundle will encompass the 3rd party jar and the custom java classes that are moved from the original WO project. 5 +Disclaimer: I am still relatively new to Eclipse, so if you see a smarter way to do this, then feel free to edit this wiki page. 6 6 Also, at the time of writing this article I was using Eclipse 3.2.1 with WOLips build #3769. 7 7 8 -=== How To ...===8 +=== How To === 9 9 10 10 ===== Adjust Your Filters ===== 11 11 12 12 Before you start, edit your Package Explorer filters so that we can really "see" the files in our project, especially so we can check if our project was created correctly by the wizard later on. To do this simply select Filters from the Package Explorer contextual menu as shown below: 13 -[[image:packageExplorer-filters.jpg]] 14 14 15 15 ... and then deselect everything except the ones show here. This of course is a user preference, but at least your screen will match my initial project picture shown here if you do as I tell you 16 -[[image:javaElementFilters.jpg]] 17 17 18 18 ===== Create the Framework project in your Eclipse workspace. ===== 19 19 ... ... @@ -26,14 +26,12 @@ 26 26 Next enter a project name and click Finish 27 27 [[image:WOnderFramework-projectname.jpg]] 28 28 29 -**WOLips Bug: If your new framework project DOES NOT look like the one in the picture below, then you have come across a known elusive WOLips bug that the team is trying to solve. In the case that your project does not look like this, the fix is to select the project and then select the Project->Close in the main menu bar. Afterward select Project->Open and then expand your project and it should be OK.** 30 -[[image:example-framework.jpg]] 27 +WOLips Bug: If your new framework project DOES NOT look like the one in the picture then you have come across a known elusive WOLips bug that the team is trying to solve. In the case that your project does not look like this, the fix is to select the project and then select the Project->Close in the main menu bar. Afterward select Project->Open and then expand your project and it should be OK. 31 31 32 -**Another Minor Bug: In the latest build I was using, the default framework project does not contain a folder named 'Components' which it needs to have a successful build later. So just create a new folder in the project named Components. Right-click the project > New > Folder** 33 - 29 +Another Minor Bug: In the latest build I was using, the default framework project does not contain a folder named 'Components' which it needs to have a successful build later. So just create a new folder in the project named Components. Right-click the project > New > Folder 34 34 [[image:newComponentsFolder.jpg]] 35 35 36 -===== Bundling 3rd Party Jars in your Framework =====32 +===== Bundling 2rd Party Jars in your Framework ===== 37 37 38 38 Next add any 3rd party jar files to your project that you want bundled with this framework. This is probably the "best practice" way to make 3rd party jars available to your WebObjects apps rather than stuffing them into /Library/WebObjects/Extensions. 39 39 ... ... @@ -49,9 +49,9 @@ 49 49 Select the jar and click OK. 50 50 [[image:buildPath-jarSelection.jpg]] 51 51 52 -Adding dependencies on other frameworks can be done at this stage if your wish. The procedure is the same as for adding framework dependencies to a WOApplication which also has a tutorial. Keep in mind that the WOnder Framework wizard adds default framework links which you can adjust and turn off easily (right-click WOFrameworks icon and select Configure)48 +Adding dependencies on other frameworks can be done at this stage if your wish. The procedure is the same as for adding framework dependencies to a WOApplication which also has a tutorial. Keep in mind that the WOnder Framework wizard adds default framework links which you can adjust and turn off easily (right-click WOFrameworks icon 53 53 54 -===== Createapackage(orpackages)for yourreusable classes. =====50 +===== Now I want to create a package for my reusable classes. ===== 55 55 56 56 Right-click on the Sources folder and select New > Package as shown here: 57 57 [[image:Sources-new-package.jpg]]