You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Dominic Graefen (JIRA)" <ji...@apache.org> on 2011/02/05 19:17:30 UTC

[jira] Created: (BUILDR-568) Buildr::download seems to be broken on windows

Buildr::download seems to be broken on windows
----------------------------------------------

                 Key: BUILDR-568
                 URL: https://issues.apache.org/jira/browse/BUILDR-568
             Project: Buildr
          Issue Type: Bug
          Components: Core features
    Affects Versions: 1.4.4
         Environment: Windows XP SP3 running inside a VM on Mac OS X
buildr 1.4.4 running with rjb
            Reporter: Dominic Graefen


In my buildr-extension I am downloading an artifact from an url

Buildr::artifact("com.adobe.alchemy:toolkit:zip:#{toolkit_version}").from(Buildr::download(toolkit_url))

which works fine on Mac OS X, but all the zip files I am downloading on Windows are corrupt.
WinRAR says: "Unexpected end of Archive"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (BUILDR-568) Buildr::download seems to be broken on windows

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

Alex Boisvert commented on BUILDR-568:
--------------------------------------

Hi Dominic,

Now that I'm (finally) testing on Windows, I see that the approach you took is incorrect.  The proper way to download an artifact from a given URL is to write,

{code}
download(artifact("org.example:something:jar:1.1" => "http://org.example/path/to/artifact-1.0.jar")
{code}

I suspect it works on MacOS because you already had the artifact downloaded correctly beforehand.

Can you try the above and see if it works for you?

> Buildr::download seems to be broken on windows
> ----------------------------------------------
>
>                 Key: BUILDR-568
>                 URL: https://issues.apache.org/jira/browse/BUILDR-568
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.4.4
>         Environment: Windows XP SP3 running inside a VM on Mac OS X
> buildr 1.4.4 running with rjb
>            Reporter: Dominic Graefen
>              Labels: buildr, core, download, windows
>
> In my buildr-extension I am downloading an artifact from an url
> Buildr::artifact("com.adobe.alchemy:toolkit:zip:#{toolkit_version}").from(Buildr::download(toolkit_url))
> which works fine on Mac OS X, but all the zip files I am downloading on Windows are corrupt.
> WinRAR says: "Unexpected end of Archive"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (BUILDR-568) Buildr::download seems to be broken on windows

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

Dominic Graefen commented on BUILDR-568:
----------------------------------------

I can fix the issue by setting the binmode on the file:

if Buildr::Util.win_os?
            unless File.exists? @sdk_zip.to_s
              FileUtils.mkdir_p File.dirname(@sdk_zip.to_s) unless File.directory? File.dirname(@sdk_zip.to_s)
              File.open @sdk_zip.to_s, 'w' do |file|
                file.binmode()
                URI.read(@url, {:progress=>true}) { |chunk| file.write chunk }
              end
            end
          else
            Buildr.artifact(@spec).from(Buildr.download(@url)).invoke unless File.exists? @sdk_zip.to_s
          end

> Buildr::download seems to be broken on windows
> ----------------------------------------------
>
>                 Key: BUILDR-568
>                 URL: https://issues.apache.org/jira/browse/BUILDR-568
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.4.4
>         Environment: Windows XP SP3 running inside a VM on Mac OS X
> buildr 1.4.4 running with rjb
>            Reporter: Dominic Graefen
>              Labels: buildr, core, download, windows
>
> In my buildr-extension I am downloading an artifact from an url
> Buildr::artifact("com.adobe.alchemy:toolkit:zip:#{toolkit_version}").from(Buildr::download(toolkit_url))
> which works fine on Mac OS X, but all the zip files I am downloading on Windows are corrupt.
> WinRAR says: "Unexpected end of Archive"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (BUILDR-568) Buildr::download seems to be broken on windows

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

Dominic Graefen edited comment on BUILDR-568 at 2/11/11 2:23 PM:
-----------------------------------------------------------------

My code works on mac even if the artifact is not in my local repo,
don't remember why I choose to write it that way.

Nonetheless, I am gonna try the code you posted once i'll get my hands on my windows machine this weekend,
looks a lot better.

Thanks

      was (Author: devboy):
    The above code works on mac even if the artifact is not in my local repo,
don't remember why I choose to write it that way.

Nonetheless, I am gonna try the code you posted once i'll get my hands on my windows machine this weekend,
looks a lot better.

Thanks
  
> Buildr::download seems to be broken on windows
> ----------------------------------------------
>
>                 Key: BUILDR-568
>                 URL: https://issues.apache.org/jira/browse/BUILDR-568
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.4.4
>         Environment: Windows XP SP3 running inside a VM on Mac OS X
> buildr 1.4.4 running with rjb
>            Reporter: Dominic Graefen
>              Labels: buildr, core, download, windows
>
> In my buildr-extension I am downloading an artifact from an url
> Buildr::artifact("com.adobe.alchemy:toolkit:zip:#{toolkit_version}").from(Buildr::download(toolkit_url))
> which works fine on Mac OS X, but all the zip files I am downloading on Windows are corrupt.
> WinRAR says: "Unexpected end of Archive"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (BUILDR-568) Buildr::download seems to be broken on windows

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoine Toulme resolved BUILDR-568.
-----------------------------------

       Resolution: Won't Fix
    Fix Version/s: 1.4.7

OK, marking as Won't Fix.

> Buildr::download seems to be broken on windows
> ----------------------------------------------
>
>                 Key: BUILDR-568
>                 URL: https://issues.apache.org/jira/browse/BUILDR-568
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.4.4
>         Environment: Windows XP SP3 running inside a VM on Mac OS X
> buildr 1.4.4 running with rjb
>            Reporter: Dominic Graefen
>              Labels: buildr, core, download, windows
>             Fix For: 1.4.7
>
>
> In my buildr-extension I am downloading an artifact from an url
> Buildr::artifact("com.adobe.alchemy:toolkit:zip:#{toolkit_version}").from(Buildr::download(toolkit_url))
> which works fine on Mac OS X, but all the zip files I am downloading on Windows are corrupt.
> WinRAR says: "Unexpected end of Archive"

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BUILDR-568) Buildr::download seems to be broken on windows

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

Dominic Graefen commented on BUILDR-568:
----------------------------------------

No, had no windows box to test on anymore. Mark it as "won't fix"as it doesn't seem to be an issue for someone else.

> Buildr::download seems to be broken on windows
> ----------------------------------------------
>
>                 Key: BUILDR-568
>                 URL: https://issues.apache.org/jira/browse/BUILDR-568
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.4.4
>         Environment: Windows XP SP3 running inside a VM on Mac OS X
> buildr 1.4.4 running with rjb
>            Reporter: Dominic Graefen
>              Labels: buildr, core, download, windows
>
> In my buildr-extension I am downloading an artifact from an url
> Buildr::artifact("com.adobe.alchemy:toolkit:zip:#{toolkit_version}").from(Buildr::download(toolkit_url))
> which works fine on Mac OS X, but all the zip files I am downloading on Windows are corrupt.
> WinRAR says: "Unexpected end of Archive"

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (BUILDR-568) Buildr::download seems to be broken on windows

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

Dominic Graefen commented on BUILDR-568:
----------------------------------------

The above code works on mac even if the artifact is not in my local repo,
don't remember why I choose to write it that way.

Nonetheless, I am gonna try the code you posted once i'll get my hands on my windows machine this weekend,
looks a lot better.

Thanks

> Buildr::download seems to be broken on windows
> ----------------------------------------------
>
>                 Key: BUILDR-568
>                 URL: https://issues.apache.org/jira/browse/BUILDR-568
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.4.4
>         Environment: Windows XP SP3 running inside a VM on Mac OS X
> buildr 1.4.4 running with rjb
>            Reporter: Dominic Graefen
>              Labels: buildr, core, download, windows
>
> In my buildr-extension I am downloading an artifact from an url
> Buildr::artifact("com.adobe.alchemy:toolkit:zip:#{toolkit_version}").from(Buildr::download(toolkit_url))
> which works fine on Mac OS X, but all the zip files I am downloading on Windows are corrupt.
> WinRAR says: "Unexpected end of Archive"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BUILDR-568) Buildr::download seems to be broken on windows

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

Antoine Toulme commented on BUILDR-568:
---------------------------------------

Dominic, did you find time to work on this ? Should we mark this bug as "Won't Fix" ?

> Buildr::download seems to be broken on windows
> ----------------------------------------------
>
>                 Key: BUILDR-568
>                 URL: https://issues.apache.org/jira/browse/BUILDR-568
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.4.4
>         Environment: Windows XP SP3 running inside a VM on Mac OS X
> buildr 1.4.4 running with rjb
>            Reporter: Dominic Graefen
>              Labels: buildr, core, download, windows
>
> In my buildr-extension I am downloading an artifact from an url
> Buildr::artifact("com.adobe.alchemy:toolkit:zip:#{toolkit_version}").from(Buildr::download(toolkit_url))
> which works fine on Mac OS X, but all the zip files I am downloading on Windows are corrupt.
> WinRAR says: "Unexpected end of Archive"

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (BUILDR-568) Buildr::download seems to be broken on windows

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

Alex Boisvert commented on BUILDR-568:
--------------------------------------

Thanks for narrowing this down, Dominic.  I'll do some testing later today on Windows and see if I can fix it in buildr code.

> Buildr::download seems to be broken on windows
> ----------------------------------------------
>
>                 Key: BUILDR-568
>                 URL: https://issues.apache.org/jira/browse/BUILDR-568
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.4.4
>         Environment: Windows XP SP3 running inside a VM on Mac OS X
> buildr 1.4.4 running with rjb
>            Reporter: Dominic Graefen
>              Labels: buildr, core, download, windows
>
> In my buildr-extension I am downloading an artifact from an url
> Buildr::artifact("com.adobe.alchemy:toolkit:zip:#{toolkit_version}").from(Buildr::download(toolkit_url))
> which works fine on Mac OS X, but all the zip files I am downloading on Windows are corrupt.
> WinRAR says: "Unexpected end of Archive"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira