Uploaded image for project: 'Buildr (Retired)'
  1. Buildr (Retired)
  2. BUILDR-458

Spurious . files added in zip archives when using :as renaming

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 1.4
    • JRuby
    • None
    • OS X 10.5.8
      jruby 1.5.1 (ruby 1.8.7 patchlevel 249) (2010-06-06 f3a3480) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_20) [x86_64-java]

    Description

      The below buildr example produces a broken (java-wise anyway) zip file with this content:

      Archive:  target/testProject-1.0.0.zip
        Length     Date   Time    Name
       --------    ----   ----    ----
             26  06-19-10 16:18   .
              0  06-19-10 16:18   dir/
             26  06-19-10 16:18   dir/bar
              9  06-19-10 16:18   foo
       --------                   -------
             61                   4 files
      

      Note the presence of the file . which appears to be a duplicate of the dir/bar file.

      # Generated by Buildr 1.4.0, change to your liking
      # Version number for this release
      VERSION_NUMBER = "1.0.0"
      # Group identifier for your projects
      GROUP = "testProject"
      COPYRIGHT = ""
      
      # Specify Maven 2.0 remote repositories here, like this:
      repositories.remote << "http://www.ibiblio.org/maven2/"
      
      desc "The TestProject project"
      define "testProject" do
      
        project.version = VERSION_NUMBER
        project.group = GROUP
        manifest["Implementation-Vendor"] = COPYRIGHT
      
        build do
          FileUtils.mkdir_p(_(:target, "test/dir"))
          File.open(_(:target, "test/foo"), "w") { | f | f.puts("foo file") }
          File.open(_(:target, "test/dir/bar"), "w") { | f | f.puts("bar file with longer text") }
        end
      
      # Works as expected
      #  package(:zip).include(_(:target, "test/**"))
      
        # Adds . in root folder of archive
        package(:zip).include(_(:target, "test"), :as => ".")
      
      end
      

      Attachments

        Activity

          People

            toulmean Antoine Toulme
            jskov Jesper Skov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: