You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mark Lybarger <Ma...@CBC-Companies.com> on 2003/12/17 19:44:10 UTC

using foreach with fileset

i'm trying to use the ant-contrib foreach task to generate deployment descriptors for my ejbs.  the bean.name in the descriptor.detail target is getting set to the full path name of the file that's included in the bean.implementation.classes path.  is there a way to have it be just the actual file name apart from the file path name?  perhaps a "better" way to do this?  

  <target name="deployment.descriptor">
    <foreach target="descriptor.detail" param="bean.name" inheritall="true" parallel="true">
        <path refid="bean.implementation.classes"/>
    </foreach>
  </target>
  
  <target name="descriptor.detail">
        <echo>beginning ${bean.name}</echo>
        <ejbdoclet verbose="on" ejbspec="2.0" destDir="${basedir.webapp.web-inf.src.gen}">
            <fileset dir="${basedir.webapp.web-inf.src}">
                <include name="**/(${bean.name}"/>
            </fileset>
			<deploymentdescriptor destinationFile="{0}-ejb-jar.xml"/>
			<weblogic destinationFile="{0}-weblogic-ejb-jar.xml"/> 			
        </ejbdoclet>
  </target>

thanks!

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 12/2/2003
 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org