Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#866 closed defect (fixed)

GS3 build.xml property should not require constant maintenance

Reported by: ak19 Owned by: ak19
Priority: moderate Milestone: 3.06 Release
Component: Greenstone3 Ant Code Severity: major
Keywords: Cc:


GS3 build.xml contains the following property definition for, which is used in target start-tomcat to check whether the OS is windows and if so, to run tomcat.

<property name="" value="Windows 95,Windows 98,Windows 2000,Windows 2003,Windows XP,Windows NT,Windows ME,Windows Vista,Windows 7,Windows Server 2008,Windows Server 2008 R2"/> <!-- check this!!!-->

Before "Windows Server 2008 (R2)" was in the list, it had failed to run on a Windows Server 2008 R2 machine until Shaoqun discovered and fixed this oversight in build.xml that prevented tomcat from starting on Windows Server 2008 RT.

She has identified the larger problem of build.xml having to maintain a list of what OS names constitute Windows. Newer OS will require constant updating. The suggestion is that we should define the property to somehow resolve to any string that matches the prefix of "Windows" so that this part of the code doesn't need constant maintenance or else results in tomcat silently failing to start (with no error messages or anything to indicate what happened).

Change History (5)

comment:1 by ak19, 10 years ago

The ticket was unnecessary, as the problem can be resolved by making the os="${}" test in the start-tomcat and force-stop-tomcat <exec> (and all other exec tasks that check os), check osfamily="windows" or osfamily="unix" instead. This option has been available since Ant 1.7.?. Shaoqun is asking the person using Windows Server 2008 to test this change at present and then the change can be made throughout build.xml and can be committed.

comment:3 by ak19, 10 years ago

Owner: changed from nobody to ak19

Shaoqun has confirmed that osfamily=windows works. This has now been used in the start-tomcat, stop-tomcat targets in one commit, and in a subsequent commit, all exec tasks in build.xml for windows os use the osfamily="windows" test instead of the os="${}" test.

The change has not been made for linux/mac cases, since the osfamily mac is not the same as unix, whereas we usually want the same exec task to be executed for both cases. So in the linux/mac situations, the exec task definition is left to test for os="${os.unix}" since this property is defined to include linux, mac and solaris.

comment:4 by ak19, 10 years ago

Resolution: fixed
Status: newclosed

comment:5 by robertthomas, 9 years ago

The most up to date listing of coupons for jabong. Our editors check coupon codes to ensure validity every day.

Note: See TracTickets for help on using tickets.