Changes for page Java Client-WebStart Incremental Build
Last modified by David Avendasora on 2009/02/05 17:10
From version 30.1
edited by David Avendasora
on 2008/01/14 10:49
on 2008/01/14 10:49
Change comment:
There is no comment for this version
To version 35.1
edited by David Avendasora
on 2008/01/15 10:21
on 2008/01/15 10:21
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,47 @@ 1 -WOLips incremental builder will not automatically create the required jar of your client-side classes and place it in the project.woa/Contents/WebServerResources/Java/ directory as is required by a Java Client application. Without the client classes placed here, the built-in Run... command will not work properly as the client application will not have access to it's classes and WebObjects will silently fail back to EOGenericRecord. This causes the confusing condition of the application launching and likely not generating any errors, but not working correctly.1 +WOLips incremental builder will not automatically create the required jar of your client-side classes and place it in the project.woa/Contents/WebServerResources/Java/ directory as is required by a Java Client application. 2 2 3 - Belowis awork-arounduntil theincrementalbuildercan bemodifiedtocreate the neededdirectoryandjarfile.3 +Without the client classes placed in WebServerResources, Eclipse's built-in Run... command will not work properly as the client application will not have access to its classes and WebObjects will silently fall-back to EOGenericRecord. This causes the confusing condition of the application launching and likely not generating any errors, but not working correctly either. 4 4 5 -1. Add a "Java" directory to the "WebServerResources" directory in your Eclipse project. 6 -1. Right-click on the new directory and select: "WOLips Tools -> Include as WebServerResource" 7 -1. Add the following code to the "javaclient" target (See the [[Ant Build>>Java Client-Build]] instructions) below the mkdir line. 5 +Below are the steps for adding an additional "Ant Builder" to your project to generate and place the required jar in the right location. 8 8 7 +1. Create a "javaclientbuild.xml" file in the root of your project, with the following as its contents: 8 + 9 9 {{code}} 10 10 11 -<jar basedir="${classes.dir}" includes="**/client/**/*.class,**/common/**/*.class" 12 - jarfile="WebServerResources/Java/${project.name}.jar"> 13 -</jar> 11 +<project name="javaclient" default="javaclient" basedir="."> 12 + <target name="setProps"> 13 + <property file="${user.home}${file.separator}build.properties"/> 14 + <property file="build.properties"/> 15 + <property file="${user.home}${file.separator}Library${file.separator}wobuild.properties"/> 16 + <condition property="wo.properties.check.failed"> 17 + <not> 18 + <and> 19 + <isset property="wo.wosystemroot"/> 20 + <isset property="wo.wolocalroot"/> 21 + </and> 22 + </not> 23 + </condition> 24 + <fail message="Could not find ${user.home}${file.separator}Library${file.separator}wobuild.properties." if="wo.properties.check.failed"/> 25 + </target> 26 + <target name="javaclient" depends="setProps"> 27 + <mkdir dir="build/${project.name}.woa/Contents/WebServerResources/Java"/> 28 + <jar basedir="${classes.dir}" includes="**/client/**/*.class,**/common/**/*.class" 29 + jarfile="build/${project.name}.woa/Contents/WebServerResources/Java/${project.name}.jar"> 30 + </jar> 31 + </target> 32 +</project> 14 14 15 15 {{/code}} 16 16 17 -This code will cause the "WOLips Ant Tools -> Install" function to put the required jar file in the project's WebServerResources directory, which the incremental builder will then pick-up and place in the build directory. 36 +1. Right-Click on your project, and select Properties. 37 +1. Click on "Builders" on the right side. 38 +1. Click the "New" button. 39 +1. Select "Ant Build" and click "Okay". 40 +1. Name it "Java Client Incremental Builder" 41 +1. Under the "Main" tab, click "Browse Workspace". 42 +1. Click on your Project, and select the javaclientbuild.xml file you created in step 1, click "Okay". 43 +1. Click okay to close the Builder Properties window. 44 +1. Make sure your new Builder is checked and executes AFTER the WOLips Incremental Builder, otherwise it will error. 45 +1. Click "Okay" to exit Project Properties. 18 18 19 - You willneedto"Install" yourapplicationeach time priorto running it in Eclipse,butit is muchbetterthanEclipse'sRunfunctionalitynotbeingavailabletoyou atall.47 +Done. You can now use the Eclipse "Run..." command just as you would for any other WOLips project.