Ticket #866 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

GS3 build.xml os.windows 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 os.windows, which is used in target start-tomcat to check whether the OS is windows and if so, to run tomcat.

<property name="os.windows" 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 os.windows 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

Changed 5 years ago by ak19

The ticket was unnecessary, as the problem can be resolved by making the os="${os.windows}" 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.

Changed 5 years ago by ak19

  • 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="${os.windows}" 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.

Changed 5 years ago by ak19

  • status changed from new to closed
  • resolution set to fixed

Changed 4 years ago by robertthomas

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.