This discussion is archived
2 Replies Latest reply: May 18, 2012 1:01 AM by Owen Thomas RSS

Compiling sources whenever run.

Owen Thomas Newbie
Currently Being Moderated
Hello to my Java friends.

Something of mild concern started happening recently, and so I'm asking for some leads that would lead me to a remedy. When I ask my IDE to run one of my programs, I get the following output:
init:
Deleting: /home/owen/NetBeansProjects/CliqueSpace/trunk/AgentDevice/build/built-jar.properties
deps-jar:
Updating property file: /home/owen/NetBeansProjects/CliqueSpace/trunk/AgentDevice/build/built-jar.properties
ClientDeviceMedia.init:
ClientDeviceMedia.deps-jar:
Updating property file: /home/owen/NetBeansProjects/CliqueSpace/trunk/AgentDevice/build/built-jar.properties
CliqueSpace.init:
CliqueSpace.deps-jar:
Updating property file: /home/owen/NetBeansProjects/CliqueSpace/trunk/AgentDevice/build/built-jar.properties
Exception.init:
Exception.deps-jar:
Updating property file: /home/owen/NetBeansProjects/CliqueSpace/trunk/AgentDevice/build/built-jar.properties
Exception.compile:
Exception.jar:
CliqueSpace.compile:
CliqueSpace.jar:
Compiling 90 source files to /home/owen/NetBeansProjects/CliqueSpace/trunk/ClientDeviceMedia/build/classes
ClientDeviceMedia.compile:
Building jar: /home/owen/NetBeansProjects/CliqueSpace/trunk/ClientDeviceMedia/dist/ClientDeviceMedia.jar
ClientDeviceMedia.jar:
compile:
run:
I am wondering why those 90 source files are compiled every time I want to run my program regardless of whether they have been touched since the program was last run. I assume this is an ant script, and it is checking some dependency that I have inadvertently removed or changed. I just don't know too much about ant (knowing how ant works is not a priority), so some pointers as to how to the 'ant dependency mechanism' is working in this specific case so I can stop these 90 files being compiled every time the program is run would be appreciated.

Thanks,

Owen.
  • 1. Re: Compiling sources whenever run.
    jduprez Pro
    Currently Being Moderated
    Hello Owen,
    There is an Ant flag -v or -verbose , which will output detailed information, including detailed resolution of dependencies rules, such as:
    [javac] Test.java omitted as D:\classes\Test.class is up to date.
    [javac] Unset.java added as D:\classes\Unset.class is outdated.
    [javac] Compiling 1 source file to D:\classes
    (from Ant's manual, http://ant.apache.org/problems.html)

    But if you're working with a version control system, which you should, you should compare the current version of the Ant build files with the latest version that used to not recompile each time (since the problem only "started happening recently").

    Regards,

    J.

    Edited by: jduprez on May 18, 2012 7:51 AM
  • 2. Re: Compiling sources whenever run.
    Owen Thomas Newbie
    Currently Being Moderated
    jduprez wrote:
    Hello Owen,
    There is an Ant flag -v or -verbose , which will output detailed information, including detailed resolution of dependencies rules, such as:
    [javac] Test.java omitted as D:\classes\Test.class is up to date.
    [javac] Unset.java added as D:\classes\Unset.class is outdated.
    [javac] Compiling 1 source file to D:\classes
    (from Ant's manual, http://ant.apache.org/problems.html)
    Excellent. I'll try this idea to see if any of the way ant functions actually sticks in my head. :)

    >
    But if you're working with a version control system, which you should, you should compare the current version of the Ant build files with the latest version that used to not recompile each time (since the problem only "started happening recently").
    Ah ha! The obvious tip. Again, sometimes my mind is too deep in a corner to try the obvious. I'm using SVN - more for code base provenance than managing concurrent development because I'm currently the only developer.

    Thanks again.

    Owen.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points