Review Board 1.7.22


SQOOP-1207 Allow user to override java source version

Review Request #14323 - Created Sept. 24, 2013 and updated

Jarek Cecho
SQOOP-1207
Reviewers
Sqoop
sqoop-trunk
Added new variable that is modeled after targetJavaVersion that allows one to override the source version used during compilation.
I've played a bit with it and it do seems to be working.

Diff revision 1 (Latest)

  1. build.xml: Loading...
build.xml
Revision c8972456e262ddb2ff959f3e2cc048ce2548926e New Change
[20] 218 lines
[+20]
219
  <property name="src.dist.dir" location="${build.dir}/${src.artifact.name}" />
219
  <property name="src.dist.dir" location="${build.dir}/${src.artifact.name}" />
220
  <property name="src.tar.file" location="${build.dir}/${src.artifact.name}.tar.gz" />
220
  <property name="src.tar.file" location="${build.dir}/${src.artifact.name}.tar.gz" />
221

    
   
221

   
222
  <!-- compilation -->
222
  <!-- compilation -->
223
  <property name="targetJavaVersion" value="1.6" />
223
  <property name="targetJavaVersion" value="1.6" />

    
   
224
  <property name="sourceJavaVersion" value="1.6" />
224
  <property name="javac.deprecation" value="off"/>
225
  <property name="javac.deprecation" value="off"/>
225
  <property name="javac.debug" value="on"/>
226
  <property name="javac.debug" value="on"/>
226
  <property name="build.encoding" value="ISO-8859-1"/>
227
  <property name="build.encoding" value="ISO-8859-1"/>
227

    
   
228

   
228
  <!-- testing with JUnit -->
229
  <!-- testing with JUnit -->
[+20] [20] 227 lines
[+20]
456
        encoding="${build.encoding}"
457
        encoding="${build.encoding}"
457
        srcdir="${build.src.dir}"
458
        srcdir="${build.src.dir}"
458
        includes="**/*.java"
459
        includes="**/*.java"
459
        destdir="${build.classes}"
460
        destdir="${build.classes}"
460
        debug="${javac.debug}"
461
        debug="${javac.debug}"

    
   
462
        source="${sourceJavaVersion}"
461
        target="${targetJavaVersion}"
463
        target="${targetJavaVersion}"
462
        deprecation="${javac.deprecation}">
464
        deprecation="${javac.deprecation}">
463
      <classpath refid="compile.classpath"/>
465
      <classpath refid="compile.classpath"/>
464
    </javac>
466
    </javac>
465

    
   
467

   
466
    <!-- Compile the main code. -->
468
    <!-- Compile the main code. -->
467
    <javac
469
    <javac
468
        encoding="${build.encoding}"
470
        encoding="${build.encoding}"
469
        srcdir="${src.dir}"
471
        srcdir="${src.dir}"
470
        includes="**/*.java"
472
        includes="**/*.java"
471
        destdir="${build.classes}"
473
        destdir="${build.classes}"
472
        debug="${javac.debug}"
474
        debug="${javac.debug}"

    
   
475
        source="${sourceJavaVersion}"
473
        target="${targetJavaVersion}"
476
        target="${targetJavaVersion}"
474
        deprecation="${javac.deprecation}">
477
        deprecation="${javac.deprecation}">
475
      <classpath refid="compile.classpath"/>
478
      <classpath refid="compile.classpath"/>
476
    </javac>
479
    </javac>
477
  </target>
480
  </target>
[+20] [20] 5 lines
[+20]
483
    <javac
486
    <javac
484
        encoding="${build.encoding}"
487
        encoding="${build.encoding}"
485
        srcdir="${test.dir}"
488
        srcdir="${test.dir}"
486
        includes="**/*.java"
489
        includes="**/*.java"
487
        destdir="${build.test.classes}"
490
        destdir="${build.test.classes}"

    
   
491
        source="${sourceJavaVersion}"
488
        target="${targetJavaVersion}"
492
        target="${targetJavaVersion}"
489
        debug="${javac.debug}">
493
        debug="${javac.debug}">
490
      <classpath>
494
      <classpath>
491
        <path refid="test.classpath"/>
495
        <path refid="test.classpath"/>
492
      </classpath>
496
      </classpath>
[+20] [20] 7 lines
[+20]
500
    <javac
504
    <javac
501
        encoding="${build.encoding}"
505
        encoding="${build.encoding}"
502
        srcdir="${perftest.src.dir}"
506
        srcdir="${perftest.src.dir}"
503
        includes="**/*.java"
507
        includes="**/*.java"
504
        destdir="${build.perftest.classes}"
508
        destdir="${build.perftest.classes}"

    
   
509
        source="${sourceJavaVersion}"
505
        target="${targetJavaVersion}"
510
        target="${targetJavaVersion}"
506
        debug="${javac.debug}">
511
        debug="${javac.debug}">
507
      <classpath>
512
      <classpath>
508
        <path refid="test.classpath"/>
513
        <path refid="test.classpath"/>
509
      </classpath>
514
      </classpath>
[+20] [20] 898 lines
  1. build.xml: Loading...