Review Board 1.7.22


SQOOP-992 Allow to set target java version during compilation

Review Request #10617 - Created April 19, 2013 and submitted

Jarek Cecho
SQOOP-992
Reviewers
Sqoop
sqoop-trunk
I've added property targetJavaVersion that can be used to set the target java version with default value 6, which is the version Hadoop currently uses.

 

Diff revision 1 (Latest)

  1. build.xml: Loading...
build.xml
Revision e356ba6a08bd4649555534b2a191ffc060e3a45d New Change
[20] 164 lines
[+20]
165
  <property name="src.artifact.name" value="${artifact.name}" />
165
  <property name="src.artifact.name" value="${artifact.name}" />
166
  <property name="src.dist.dir" location="${build.dir}/${src.artifact.name}" />
166
  <property name="src.dist.dir" location="${build.dir}/${src.artifact.name}" />
167
  <property name="src.tar.file" location="${build.dir}/${src.artifact.name}.tar.gz" />
167
  <property name="src.tar.file" location="${build.dir}/${src.artifact.name}.tar.gz" />
168

    
   
168

   
169
  <!-- compilation -->
169
  <!-- compilation -->

    
   
170
  <property name="targetJavaVersion" value="1.6" />
170
  <property name="javac.deprecation" value="off"/>
171
  <property name="javac.deprecation" value="off"/>
171
  <property name="javac.debug" value="on"/>
172
  <property name="javac.debug" value="on"/>
172
  <property name="build.encoding" value="ISO-8859-1"/>
173
  <property name="build.encoding" value="ISO-8859-1"/>
173

    
   
174

   
174
  <!-- testing with JUnit -->
175
  <!-- testing with JUnit -->
[+20] [20] 197 lines
[+20]
372
        encoding="${build.encoding}"
373
        encoding="${build.encoding}"
373
        srcdir="${build.src.dir}"
374
        srcdir="${build.src.dir}"
374
        includes="**/*.java"
375
        includes="**/*.java"
375
        destdir="${build.classes}"
376
        destdir="${build.classes}"
376
        debug="${javac.debug}"
377
        debug="${javac.debug}"

    
   
378
        target="${targetJavaVersion}"
377
        deprecation="${javac.deprecation}">
379
        deprecation="${javac.deprecation}">
378
      <classpath refid="compile.classpath"/>
380
      <classpath refid="compile.classpath"/>
379
    </javac>
381
    </javac>
380

    
   
382

   
381
    <!-- Compile the main code. -->
383
    <!-- Compile the main code. -->
382
    <javac
384
    <javac
383
        encoding="${build.encoding}"
385
        encoding="${build.encoding}"
384
        srcdir="${src.dir}"
386
        srcdir="${src.dir}"
385
        includes="**/*.java"
387
        includes="**/*.java"
386
        destdir="${build.classes}"
388
        destdir="${build.classes}"
387
        debug="${javac.debug}"
389
        debug="${javac.debug}"

    
   
390
        target="${targetJavaVersion}"
388
        deprecation="${javac.deprecation}">
391
        deprecation="${javac.deprecation}">
389
      <classpath refid="compile.classpath"/>
392
      <classpath refid="compile.classpath"/>
390
    </javac>
393
    </javac>
391
  </target>
394
  </target>
392

    
   
395

   
[+20] [20] 4 lines
[+20]
397
    <javac
400
    <javac
398
        encoding="${build.encoding}"
401
        encoding="${build.encoding}"
399
        srcdir="${test.dir}"
402
        srcdir="${test.dir}"
400
        includes="**/*.java"
403
        includes="**/*.java"
401
        destdir="${build.test.classes}"
404
        destdir="${build.test.classes}"

    
   
405
        target="${targetJavaVersion}"
402
        debug="${javac.debug}">
406
        debug="${javac.debug}">
403
      <classpath>
407
      <classpath>
404
        <path refid="test.classpath"/>
408
        <path refid="test.classpath"/>
405
      </classpath>
409
      </classpath>
406
    </javac>
410
    </javac>
[+20] [20] 6 lines
[+20]
413
    <javac
417
    <javac
414
        encoding="${build.encoding}"
418
        encoding="${build.encoding}"
415
        srcdir="${perftest.src.dir}"
419
        srcdir="${perftest.src.dir}"
416
        includes="**/*.java"
420
        includes="**/*.java"
417
        destdir="${build.perftest.classes}"
421
        destdir="${build.perftest.classes}"

    
   
422
        target="${targetJavaVersion}"
418
        debug="${javac.debug}">
423
        debug="${javac.debug}">
419
      <classpath>
424
      <classpath>
420
        <path refid="test.classpath"/>
425
        <path refid="test.classpath"/>
421
      </classpath>
426
      </classpath>
422
    </javac>
427
    </javac>
[+20] [20] 849 lines
  1. build.xml: Loading...