You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Peter Donald (JIRA)" <ji...@apache.org> on 2012/10/07 01:49:04 UTC

[jira] [Updated] (BUILDR-372) Documentation should include an example of extracting a file out of an artifact

     [ https://issues.apache.org/jira/browse/BUILDR-372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Donald updated BUILDR-372:
--------------------------------

    Fix Version/s: 1.5
    
> Documentation should include an example of extracting a file out of an artifact
> -------------------------------------------------------------------------------
>
>                 Key: BUILDR-372
>                 URL: https://issues.apache.org/jira/browse/BUILDR-372
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Site/documentation
>            Reporter: Kevin Smith
>             Fix For: 1.5
>
>
> I wanted to extract a license file out of a third-party jar, and couldn't find an easy way to do it. Turns out there is an easy way, so this should probably be included in the user guide, along with an explanation of how/why it works. Here is my code that you can use as a starting point:
>   build do
>     dir = _('target', 'jetty')
>     license_name = 'LICENSE.html'
>     unzip(dir=>artifact(JETTY_SPEC)).include("**/#{license_name}")
>     license_file = File.join(dir, license_name)
>     install artifact(JETTY_LICENSE_SPEC).from(license_file)
>     FileUtils::rm_rf dir
>   end

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira