Changeset 7711


Ignore:
Timestamp:
May 21, 2019, 8:47:30 AM (2 years ago)
Author:
Nicklas Nordborg
Message:

References #2139: Switch to Java 11 (or later)

Changed build script to specify Java 11. Biggest change is that the 'source' and 'target' parameters have merged to 'release' parameter and that 'bootclasspath' is no longer supported when compiling against java versions > 8.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r7683 r7711  
    7878  <property name="jsp.xlint" value="all,-serial"
    7979    description="Xlint parameter when compiling JSP files (-serial is needed since jasper doesn't generate a serialVersionUID)" />
    80   <!-- NOTE! Source and Target versions are also in the config/dist/web.xml for the JSP servlet declaration -->
    81   <!-- If the values are changed here, they should also be changed in web.xml -->
    82   <property name="javac.source" value="1.8"
    83     description="Default value for the 'source' attribute when compiling java code" />
    84   <property name="javac.target" value="1.8"
    85     description="Default value for the 'target' attribute when compiling java code" />
     80  <!-- NOTE! Releae version is also in the config/dist/web.xml for the JSP servlet declaration -->
     81  <!-- If the value is changed here, it should also be changed in web.xml -->
     82  <property name="javac.release" value="11"
     83    description="Default value for the 'release' attribute when compiling java code" />
    8684  <property name="javac.encoding" value="UTF-8"
    8785    description="Default value for the 'encoding' attribute when compiling java code" />
    88   <property name="javac.bootclasspath" value="."
    89     description="Path to JRE containing the Java version we are building BASE against." />
    9086  <property name="javadoc.arg" value="-Xdoclint:all,-missing"
    9187    description="Extra arguments sent to Javadoc generation" />
     
    104100    <fileset dir="${lib}/dist">
    105101      <include name="**/*.jar"/>
    106     </fileset>
    107   </path>
    108 
    109   <path id="lib.bootclasspath">
    110     <fileset dir="${javac.bootclasspath}">
    111       <include name="lib/*.jar" />
    112102    </fileset>
    113103  </path>
     
    420410      debug="true"
    421411      deprecation="true"
    422       source="${javac.source}"
    423       target="${javac.target}"
    424       bootclasspathref="lib.bootclasspath"
     412      release="${javac.release}"
    425413      includeantruntime="false"
    426414      >
     
    617605      debug="true"
    618606      deprecation="true"
    619       source="${javac.source}"
    620       target="${javac.target}"
    621       bootclasspathref="lib.bootclasspath"
     607      release="${javac.release}"
    622608      includeantruntime="false"
    623609      >
     
    682668      debug="true"
    683669      deprecation="true"
    684       source="${javac.source}"
    685       target="${javac.target}"
    686       bootclasspathref="lib.bootclasspath"
     670      release="${javac.release}"
    687671      includeantruntime="false"
    688672      >
     
    778762      debug="true"
    779763      deprecation="true"
    780       source="${javac.source}"
    781       target="${javac.target}"
    782       bootclasspathref="lib.bootclasspath"
     764      release="${javac.release}"
    783765      includeantruntime="false"
    784766      >
     
    836818      <property name="javac.bootclasspath" value="${javac.bootclasspath}" />
    837819      <property name="javac.encoding" value="${javac.encoding}" />
    838       <property name="javac.source" value="${javac.source}" />
    839       <property name="javac.target" value="${javac.target}" />
     820      <property name="javac.release" value="${javac.release}" />
    840821      <property name="jsp.xlint" value="${jsp.xlint}" />
    841822    </ant>
     
    863844      debug="true"
    864845      deprecation="true"
    865       source="${javac.source}"
    866       target="${javac.target}"
    867       bootclasspathref="lib.bootclasspath"
     846      release="${javac.release}"
    868847      includeantruntime="false"
    869848      >
     
    905884      debug="true"
    906885      deprecation="true"
    907       source="${javac.source}"
    908       target="${javac.target}"
    909       bootclasspathref="lib.bootclasspath"
     886      release="${javac.release}"
    910887      includeantruntime="false"
    911888      >
     
    952929      debug="true"
    953930      deprecation="true"
    954       source="${javac.source}"
    955       target="${javac.target}"
    956       bootclasspathref="lib.bootclasspath"
     931      release="${javac.release}"
    957932      includeantruntime="false"
    958933      >
  • trunk/config/dist/web.xml

    r7635 r7711  
    225225  <!-- Our JSP:s will not compile unless:   -->
    226226  <!-- strictQuoteEscaping=false (default is true)-->
    227   <!-- compilerSourceVM=1.8 (default is 1.7) -->
    228   <!-- compilerTargetVM=1.8 (default is 1.7) -->
     227  <!-- compilerSourceVM=11 (default is 1.8) -->
     228  <!-- compilerTargetVM=11 (default is 1.8) -->
    229229  <servlet>
    230230    <servlet-name>jsp</servlet-name>
     
    236236    <init-param>
    237237      <param-name>compilerSourceVM</param-name>
    238       <param-value>1.8</param-value>
     238      <param-value>11</param-value>
    239239    </init-param>
    240240    <init-param>
    241241      <param-name>compilerTargetVM</param-name>
    242       <param-value>1.8</param-value>
     242      <param-value>11</param-value>
    243243    </init-param>
    244244    <init-param>
  • trunk/jsp-precompile.xml

    r7607 r7711  
    3030    jsp.src = path to directory containing JSP files to be compile
    3131    jsp.build = path to working directory where intermediate .java files and compiled .class files should be saved
    32     javac.source, javac.target = source and target version of java files
     32    javac.release = source and target version of java files
    3333  -->
    3434  <property name="javac.encoding" value="UTF-8" />
    35   <property name="javac.bootclasspath" value="." />
    3635  <!--
    3736    Use Xlint to detect potential problems:
     
    5857  <target name="compile">
    5958   
    60     <path id="boot.classpath">
    61       <fileset dir="${javac.bootclasspath}">
    62         <include name="lib/*.jar" />
    63       </fileset>
    64     </path>
    65    
    6659    <path id="compile.classpath">
    6760      <pathelement location="${jsp.src}/WEB-INF/classes" />
     
    8578      srcdir="${jsp.build}/java"
    8679      classpathref="compile.classpath"
    87       bootclasspathref="boot.classpath"
    8880      fork="true"
    8981      debug="true"
    9082      includeantruntime="false"
    91       source="${javac.source}"
    92       target="${javac.target}"
     83      release="${javac.release}"
    9384      encoding="${javac.encoding}"
    9485      >
Note: See TracChangeset for help on using the changeset viewer.