Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-4353

ClassicPluginStrategy doesn't update pre-installed plugins in hudson.war

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • None
    • Platform: All, OS: All

      Hi

      I found a bug in the ClassicPluginStrategy. When the .timestamp file is created
      the lastModifiedTime is set to the machine current time, which is then compared
      to the HPI file lastModifiedTime and if the latter is greater then the plugin is
      re-extracted and updated. However the HPI lastModificationTime of the
      pre-installed plugin(s) is set to the date when the plugin was compiled and for
      that reason the plugin is never updated (current machine time is always greated
      than the compilation time).

      The bug can be reproduced by using following steps:
      1) install and start new hudson 1.320
      2) check the plugin version of
      <HUDSON_HOME>/plugins/maven-plugin/META-INF/MANIFEST.MF
      3) stop hudson, update it to version 1.321, and start it again
      4) check the plugin version again. It is still 1.320

      I narrow down the problem inside the ClassicPluginStrategy, so instead of using
      the machine current time it is setting the .timestamp lastModifiedTime to HPI
      file lastModifiedTime.

      Best regards
      Kiril

            Unassigned Unassigned
            kir0 kir0
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: