开发者

How do i execute an ant task on files in a specified folder?

I have to preprocess some state machine (.sm) files using a compiler to generate java code before compiling the rest of my project, and using an ant task to do it. At this moment i have to add each file i need to parse manually in the ant target.

How can i use ant to go through a directory i specify and execute the task on all files it finds with .sm extension?

开发者_StackOverflowThe task needs the filename as a parameter and i don't know how to read that automatically and pass it to the task call.

 <target name="smc-gen" >
        <smc target="java" smfile="${srcPath}/someSmFile.sm" destdir="${ControlPanel.Controller}" smcjar="${smc.jar}" />          
    </target>


The apply task will process all files in the given folder which have a specified extension or name/extension pattern.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜