blob: 155f8682c534512422aa7660553e13078753a4b9 [file] [log] [blame]
<!--
******************************************************************************
* Copyright (c) 2016 Oracle
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Konstantin Komissarchik - initial implementation and ongoing maintenance
******************************************************************************
-->
<project name="corundum.macro.expand-all">
<macrodef name="expand-all">
<attribute name="source.dir"/>
<attribute name="dest.dir" default="@{source.dir}"/>
<attribute name="suffix" default="jar"/>
<attribute name="includes" default="*.@{suffix}"/>
<attribute name="excludes" default=""/>
<element name="do" implicit="true" optional="true"/>
<sequential>
<for param="archive.file">
<path>
<fileset dir="@{source.dir}" includes="@{includes}" excludes="@{excludes}"/>
</path>
<sequential>
<basename property="base.name" file="@{archive.file}" suffix="@{suffix}"/>
<unzip src="@{archive.file}" dest="@{dest.dir}/${base.name}" overwrite="true"/>
<do/>
<var name="base.name" unset="true"/>
</sequential>
</for>
</sequential>
</macrodef>
</project>