You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Antoine Toulme (JIRA)" <ji...@apache.org> on 2009/07/27 17:39:15 UTC

[jira] Created: (BUILDR-299) Adding an empty directory to the zip file created with the package task doesn't work

Adding an empty directory to the zip file created with the package task doesn't work
------------------------------------------------------------------------------------

                 Key: BUILDR-299
                 URL: https://issues.apache.org/jira/browse/BUILDR-299
             Project: Buildr
          Issue Type: Bug
    Affects Versions: 1.3.4
         Environment: ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
            Reporter: Antoine Toulme


To reproduce the problem, try copying this code into a buildfile and run buildr package:

define "a" do
  project.version = "1.0.0"
  project.group = 'a'
  package(:zip).tap do |zipfile|
      mkdir_p(_("target/tmpdir"))
      zipfile.include(_("target/tmpdir"), :as => 'logs')
  end
end

Expected: an empty directory should be present in the zip
Actual: no directory is present in the zip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-299) Adding an empty directory to the zip file created with the package task doesn't work

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12737289#action_12737289 ] 

Antoine Toulme commented on BUILDR-299:
---------------------------------------

The workaround fixes the issue for me.

> Adding an empty directory to the zip file created with the package task doesn't work
> ------------------------------------------------------------------------------------
>
>                 Key: BUILDR-299
>                 URL: https://issues.apache.org/jira/browse/BUILDR-299
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>         Environment: ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
>            Reporter: Antoine Toulme
>
> To reproduce the problem, try copying this code into a buildfile and run buildr package:
> define "a" do
>   project.version = "1.0.0"
>   project.group = 'a'
>   package(:zip).tap do |zipfile|
>       mkdir_p(_("target/tmpdir"))
>       zipfile.include(_("target/tmpdir"), :as => 'logs')
>   end
> end
> Expected: an empty directory should be present in the zip
> Actual: no directory is present in the zip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-299) Adding an empty directory to the zip file created with the package task doesn't work

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12737275#action_12737275 ] 

Alex Boisvert commented on BUILDR-299:
--------------------------------------

As a workaround you can write the following:

package(:zip).path("logs")

to create the empty directory.  I don't know if it's a bug or feature.

> Adding an empty directory to the zip file created with the package task doesn't work
> ------------------------------------------------------------------------------------
>
>                 Key: BUILDR-299
>                 URL: https://issues.apache.org/jira/browse/BUILDR-299
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>         Environment: ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
>            Reporter: Antoine Toulme
>
> To reproduce the problem, try copying this code into a buildfile and run buildr package:
> define "a" do
>   project.version = "1.0.0"
>   project.group = 'a'
>   package(:zip).tap do |zipfile|
>       mkdir_p(_("target/tmpdir"))
>       zipfile.include(_("target/tmpdir"), :as => 'logs')
>   end
> end
> Expected: an empty directory should be present in the zip
> Actual: no directory is present in the zip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-299) Adding an empty directory to the zip file created with the package task doesn't work

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738248#action_12738248 ] 

Antoine Toulme commented on BUILDR-299:
---------------------------------------

It fixes the issue but the packaging check fails:

check package(:zip), 'should contain all expected files' do 
        it.should contain("#{cloud}/work")
        it.should contain("#{cloud}/logs")
end

It fails with this error:
Expected /Users/antoine/w/a-build/a/target/a-2.0.0.006-SNAPSHOT.zip to contain 'a-2.0.0.006-SNAPSHOT/work'

I just checked and the work directory is present.

> Adding an empty directory to the zip file created with the package task doesn't work
> ------------------------------------------------------------------------------------
>
>                 Key: BUILDR-299
>                 URL: https://issues.apache.org/jira/browse/BUILDR-299
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>         Environment: ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
>            Reporter: Antoine Toulme
>
> To reproduce the problem, try copying this code into a buildfile and run buildr package:
> define "a" do
>   project.version = "1.0.0"
>   project.group = 'a'
>   package(:zip).tap do |zipfile|
>       mkdir_p(_("target/tmpdir"))
>       zipfile.include(_("target/tmpdir"), :as => 'logs')
>   end
> end
> Expected: an empty directory should be present in the zip
> Actual: no directory is present in the zip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-299) Adding an empty directory to the zip file created with the package task doesn't work

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839336#action_12839336 ] 

Alex Boisvert commented on BUILDR-299:
--------------------------------------

I would tend to rate is as a bug.  If you've got the heart... go ahead.

> Adding an empty directory to the zip file created with the package task doesn't work
> ------------------------------------------------------------------------------------
>
>                 Key: BUILDR-299
>                 URL: https://issues.apache.org/jira/browse/BUILDR-299
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>         Environment: ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
>            Reporter: Antoine Toulme
>
> To reproduce the problem, try copying this code into a buildfile and run buildr package:
> define "a" do
>   project.version = "1.0.0"
>   project.group = 'a'
>   package(:zip).tap do |zipfile|
>       mkdir_p(_("target/tmpdir"))
>       zipfile.include(_("target/tmpdir"), :as => 'logs')
>   end
> end
> Expected: an empty directory should be present in the zip
> Actual: no directory is present in the zip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-299) Adding an empty directory to the zip file created with the package task doesn't work

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839330#action_12839330 ] 

Antoine Toulme commented on BUILDR-299:
---------------------------------------

So bug or feature ?

I'm willing to invest a bit of time in finding out.

> Adding an empty directory to the zip file created with the package task doesn't work
> ------------------------------------------------------------------------------------
>
>                 Key: BUILDR-299
>                 URL: https://issues.apache.org/jira/browse/BUILDR-299
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>         Environment: ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
>            Reporter: Antoine Toulme
>
> To reproduce the problem, try copying this code into a buildfile and run buildr package:
> define "a" do
>   project.version = "1.0.0"
>   project.group = 'a'
>   package(:zip).tap do |zipfile|
>       mkdir_p(_("target/tmpdir"))
>       zipfile.include(_("target/tmpdir"), :as => 'logs')
>   end
> end
> Expected: an empty directory should be present in the zip
> Actual: no directory is present in the zip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-299) Adding an empty directory to the zip file created with the package task doesn't work

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735626#action_12735626 ] 

Antoine Toulme commented on BUILDR-299:
---------------------------------------

Note that even though it is not packaged, the tmpdir is created.

> Adding an empty directory to the zip file created with the package task doesn't work
> ------------------------------------------------------------------------------------
>
>                 Key: BUILDR-299
>                 URL: https://issues.apache.org/jira/browse/BUILDR-299
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>         Environment: ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
>            Reporter: Antoine Toulme
>
> To reproduce the problem, try copying this code into a buildfile and run buildr package:
> define "a" do
>   project.version = "1.0.0"
>   project.group = 'a'
>   package(:zip).tap do |zipfile|
>       mkdir_p(_("target/tmpdir"))
>       zipfile.include(_("target/tmpdir"), :as => 'logs')
>   end
> end
> Expected: an empty directory should be present in the zip
> Actual: no directory is present in the zip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.