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

Antoine Toulme closed BUILDR-372.
---------------------------------
    Resolution: Auto Closed

Closing for inactivity. This type of change is welcome on the wiki.

> 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 was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to