[metrics-bugs] #20596 [Metrics]: add jdk version to manifest files

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Nov 9 10:04:31 UTC 2016


#20596: add jdk version to manifest files
-------------------------+------------------------------
 Reporter:  iwakeh       |          Owner:  metrics-team
     Type:  enhancement  |         Status:  needs_review
 Priority:  Medium       |      Milestone:
Component:  Metrics      |        Version:
 Severity:  Normal       |     Resolution:
 Keywords:               |  Actual Points:
Parent ID:               |         Points:
 Reviewer:               |        Sponsor:
-------------------------+------------------------------

Comment (by iwakeh):

 For preventing the jdk version issue (cf. #20521 comments 4 following) a
 version check could be added to warn on the command line:

 {{{
 --- a/build.xml
 +++ b/build.xml
 @@ -89,7 +89,19 @@
      <delete file="${cobertura.ser.file}" quiet="true" />
    </target>

 -  <target name="init">
 +  <condition property="wrong-jvm">
 +    <not>
 +      <contains substring="${source-and-target-java-version}"
 +               string="${java.version}" />
 +    </not>
 +  </condition>
 +
 +  <target name="jvmversioncheck" if="wrong-jvm">
 +      <echo message="WARNING!" />
 +      <echo message="Expected ${source-and-target-java-version}, but have
 ${java.version}." />
 +  </target>
 +
 +  <target name="init" depends="jvmversioncheck">
      <mkdir dir="${classes}"/>
      <mkdir dir="${testclasses}"/>
      <mkdir dir="${docs}"/>
 }}}

 This will result in a reminder warning message, if the jdk is not correct:

 {{{
 jvmversioncheck:
      [echo] WARNING!
      [echo] Expected 1.7, but have 1.8.0_102.

 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20596#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the metrics-bugs mailing list