> Okay, this is where I get confused. Is com.mycompany.util.class1 actually
> a package name -- or is it the name of a class file within the
> com.mycompany.util package?
The second... fully-qualified class names...
> Well, assuming the above question's answer is the "or", the following
> build.xml file should give you, from a fileset of .java source filenames,
> a comma-separated list of the same set of files with .class suffixes (with
> the path changed to be in a build/classes dir) and a comma-separated list
> of the same set of files in the dot-notation you show above (note: it does
> require 1.5alpha for the <replaceregexp> task, but I believe that is what
> you're using, right?):
> <project name="malachi" default="genLists">
>
> <fileset dir="src" id="srcfiles">
> <include name="com/mycompany/util/class1.java"/>
> <include name="com/mycompany/io/class2.java"/>
> </fileset>
>
> <target name="genLists" depends="setClassList,setPkgList">
> <echo message="classfiles = ${classfiles}"/>
> <echo message="pkglist = ${pkglist}"/>
> </target>
>
> <target name="setClassList">
> <delete file="classes.properties"/>
> <pathconvert pathsep="," property="classes" refid="srcfiles">
> <map from="${basedir}${file.separator}src"
> to="${basedir}${file.separator}build${file.separator}classes"/>
> </pathconvert>
> <propertyfile file="classes.properties">
> <entry key="classfiles" value="${classes}"/>
> </propertyfile>
> <replace file="classes.properties">
> <replacefilter token=".java" value=".class"/>
> </replace>
> <property file="classes.properties"/>
> </target>
>
> <target name="setPkgList">
> <delete file="pkgs.properties"/>
> <pathconvert pathsep="," dirsep="." property="pkgs" refid="srcfiles">
> <map from="${basedir}" to=""/>
> </pathconvert>
> <propertyfile file="pkgs.properties">
> <entry key="pkglist" value="${pkgs}"/>
> </propertyfile>
> <replace file="pkgs.properties">
> <replacefilter token=".src." value=""/>
> </replace>
> <replaceregexp file="pkgs.properties"
> match="\.java"
> replace=""
> flags="g"
> byline="true"/>
> <property file="pkgs.properties"/>
> </target>
>
> </project>
>
> Diane
Let me give this a shot... I haven't seen this replaceregexp stuff, so let me
mull it
over. THANKS!
--
Malachi
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>