Changeset 38893 for main/trunk


Ignore:
Timestamp:
2024-04-04T10:39:56+13:00 (2 months ago)
Author:
kjdon
Message:

I got tired of being tripped up time and again when running ant install without JAVA_HOME set. added check-java-home target, and call this for prepare and install targets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r38879 r38893  
    829829
    830830 
    831 
    832   <target name="test-setup" depends="needs-gs3-setup">
     831  <target name="check-java-home">
     832    <property environment="envi"/>
     833    <echo>using JAVA_HOME : ${envi.JAVA_HOME}</echo>
     834
     835    <condition property="java.home.set">
     836        <isset property="envi.JAVA_HOME"/>
     837    </condition>
     838    <fail unless="java.home.set" message="Please make sure your JAVA_HOME is set to the installation of a JDK 1.8 or later"/>
     839  </target>
     840  <target name="test-setup" depends="needs-gs3-setup, check-java-home">
     841   
    833842    <echo>ant.version   = ${ant.version}</echo>
    834843    <echo>java.version  = ${java.specification.version} (specification version)</echo>
     
    843852    <echo>env.Path     : ${env.Path}</echo>
    844853    <echo>env.GSDLOS   : ${env.GSDLOS}</echo>
     854   
    845855  </target>
    846856
     
    11311141  <!-- ==================== Primary and Global Targets ============================= -->
    11321142
    1133   <target name="prepare" depends="accept-properties,init,copy-dot-svn-files,prepare-core,prepare-packages,prepare-wget-for-windows,prepare-common-src,prepare-collection-building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections, prepare-flax,prepare-binaries"
     1143  <target name="prepare" depends="check-java-home,accept-properties,init,copy-dot-svn-files,prepare-core,prepare-packages,prepare-wget-for-windows,prepare-common-src,prepare-collection-building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections, prepare-flax,prepare-binaries"
    11341144    description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional subversion checkouts and downloads, so you need to be online to run this.">
    11351145
     
    11451155  <!-- install-common-src and install-collection-building are mutually exclusive and either one or the other will be done depending on whether collection building is enabled or not -->
    11461156  <!--before configuring build-src, make sure that gnome-lib is compiled up-->
    1147   <target name="install" depends="init,compile-imagemagick,compile-gnome-lib,install-common-src,install-collection-building,install-runtime,install-solr-ext,install-webswing-ext,install-gli-for-webswing,install-usersDB,setup-for-eclipse"
     1157  <target name="install" depends="check-java-home,init,compile-imagemagick,compile-gnome-lib,install-common-src,install-collection-building,install-runtime,install-solr-ext,install-webswing-ext,install-gli-for-webswing,install-usersDB,setup-for-eclipse"
    11481158    description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare new-install'.">
    11491159    <echo>After successful installation, you can turn on https support on Windows and Linux</echo>
     
    15541564  <!-- this sets up some initial properties -->
    15551565  <target name="init">
    1556    
     1566
    15571567    <condition property="java.too.old">
    15581568      <or>
     
    38083818  </target>
    38093819 
    3810   <target name="compile-packages" description="Compile only the source packages">
     3820  <target name="compile-packages" depends="init" description="Compile only the source packages">
     3821    <!-- Search4j -->
     3822    <antcall target="compile-search4j"/>
    38113823    <!-- javagdbm -->
    38123824    <antcall target="compile-javagdbm"/>
    3813     <!-- Search4j -->
    3814     <antcall target="compile-search4j"/>
    38153825  </target>
    38163826
Note: See TracChangeset for help on using the changeset viewer.