Thanks for the reply, Matt and Tanguy!
Your suggestions really works!
Best regards.
RADEMAKERS Tanguy wrote:
> Hello Leandro,
>
> Here's an example of using the pathconvert task to do this
>
> <target name="generate.ejb" depends="check_required, init"
> if="ejb.generate.required">
> <!-- scan the ${COMP_JAVA_SRC} directory and get the *.java
> files -->
> <path id="ejbgen.path">
> <fileset dir="${COMP_JAVA_SRC}" casesensitive="yes">
> <include name="**/*Bean.java"/>
> <exclude name="**/entities/*Bean.java"/>
> <exclude name="**/Abstract*Bean.java"/>
> </fileset>
> </path>
>
> <!-- turn that into a space seperated list of file paths -->
> <pathconvert property="ejbjen.files" refid="ejbgen.path"
> dirsep="/" pathsep=" "/>
>
> <!-- invoke ejbGen on these file paths -->
> <java classname="weblogic.tools.ejbgen.EJBGen"
> classpathref="path.ejbgen" fork="True" failonerror="True"
> maxmemory="256m">
> <arg line="-sourcepath ${COMP_JAVA_SRC}"/>
> <arg line="-templateDir ${EJBGEN_TEMPLATES}"/>
> <arg line="-d ${COMP_GENERATED}"/>
> <arg line="-descriptorDir ${COMP_EJB}/META-INF"/>
> <arg line="-errorFile ${basedir}/ejbgen_errors.txt"/>
> <arg line="-source 1.4"/>
> <arg line="-wls81"/>
> <arg line="${ejbjen.files}"/>
> </java>
> </target>
>
> Regs,
> /t
> Leandro Trevisan Nunes wrote:
>
>> Hi,
>> there is any way to assign a FileSet as line argument for the <java>
>> task?
>>
>> My script will run a java app that takes several itens as line
>> arguments (a file list),
>> like the following: [eu@lince]$ java MyApp file1.dat file2.dat
>> file3.dat .... fileN.dat
>>
>> So I'm using the <java> task to run the app, but the <arg> do not
>> allow the use of a FileSet.
>> It only allows parameters such as line, value, path, file, etc wich
>> doesn't fit to my needs.
>>
>> A piece of my code follows:
>>
>> <target name="make">
>> <java classname="MyApp">
>> <classpath>
>> <fileset dir="." casesensitive="yes">
>> <filename name="**/*.jar"/>
>> </fileset>
>> </classpath>
>> <arg>
>> .... here I need something like a FileSet
>> ..... </arg>
>> </java>
>> </target>
>>
>>
>> oh, help me.
>>
>> Thanks for the patience.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
--
- - - - - - - - - - - -
Leandro Trevisan Nunes
Engenharia de Sotware
Trifax Tecnologia LTDA
(41) 3022-2600
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|