Ant/Javac: building as many files as possible?

From: GG (grisha_at_alum.mit.edu)
Date: 07/14/04

  • Next message: Roedy Green: "Re: Forcing different Serialization/Externalization for identical references"
    Date: 13 Jul 2004 21:39:09 -0700
    
    

    Hi all,

    This is not necessarily an Ant question, nor a standard sun Javac. I
    am using both, and all suggestions are welcome.

    I would like to build as many classes as possible from a given
    "project". In an Ant script, I just supply all classes from a given
    "project" (or "module" -- the idea is that the code base is divided
    into modules), and even say failonerror="false". At which point the
    build script would take files from source control and build them, in
    the order of specified dependencies. That is, if module X depends on
    module Y, I want to build module Y into a .jar, and then supply it to
    module X. Now, as much as I would like people not to check in stuff
    that does not compile, sometimes it happens. Given that this is not a
    big project (yet), I think it's worthwhile to allow people to make
    mistakes, but still to be able to build whatever is possible. But if I
    supply all the .java files on the same command line to javac, once one
    compile fails, the whole thing fails. I ended up writing my own
    CompilerAdapter for Ant to take care of that, but I wonder if there's
    a better way -- if something fails, let it fail,
    but compile whatever you can (and build a .jar).

    So, I guess, the question is clear. What do you suggest? (Technical
    solutions, only, please (as opposed to "policy" solutions).

    Thanks.


  • Next message: Roedy Green: "Re: Forcing different Serialization/Externalization for identical references"

    Relevant Pages

    • Ant/Javac: building as many files as possible?
      ... This is not necessarily an Ant question, nor a standard sun Javac. ... that does not compile, sometimes it happens. ... compile fails, the whole thing fails. ...
      (comp.lang.java.help)
    • Ant/Javac: building as many files as possible?
      ... This is not necessarily an Ant question, nor a standard sun Javac. ... that does not compile, sometimes it happens. ... compile fails, the whole thing fails. ...
      (comp.lang.java.developer)
    • Ant/Javac: building as many files as possible?
      ... This is not necessarily an Ant question, nor a standard sun Javac. ... that does not compile, sometimes it happens. ... compile fails, the whole thing fails. ...
      (comp.lang.java.programmer)
    • Re: speeding up javac
      ... For various reasons using ANT ... it wouldn't be difficult to write a Java program that ... I already did this to some extent when it selects what to compile (I ... ANT doesn't do anything as clever as scan imports; ...
      (comp.lang.java.programmer)
    • Ant Help
      ... Java source files to compile. ... Only Java files that have no ... How can we make Ant to compile only the source file in that have ...
      (comp.lang.java.programmer)