ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject RE: Compile stops after first error.. how to avoid that?
Date Thu, 18 Jul 2002 14:53:05 GMT
--- "Hertel, Oliver" <Oliver.Hertel@Dresdner-Bank.com> wrote:
> And it is no solution to compile every small part in its own javac task,
> because there would be 60 or 70 of them and with a new one we had to
> update the build.xml each time, too.
[snip]
> *sigh* :-)

"Sigh"? Why?

  <target name="compile">
    <property name="foe" value="no"/>
    <mkdir dir="${classes.out}"/>
    <dirset id="ds" dir="${src.dir}" includes="com/foo/pkg?"/>
    <pathconvert property="srcdirs" pathsep="," refid="ds">
      <map from="${src.dir}${file.separator}" to=""/>
    </pathconvert>
    <foreach list="${srcdirs}" param="dir" target="doCompile"/>
  </target>

  <target name="doCompile">
    <fail unless="dir" message="Error: dir property must be set."/>
    <javac srcdir="${src.dir}" destdir="${classes.out}"
           failonerror="${foe}">
      <include name="${dir}/**"/>
    </javac>
  </target>

Of course, you will probably need to work on it a bit, since it's unlikely
your packages are named com/foo/pkg1, com/foo/pkg2, etc. -- but I suspect
that with a bit of thinking about it, you can probably figure something
out that will get you what you need.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

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


Mime
View raw message