You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Chun Ji <CJ...@pro-unlimited.com> on 2006/07/19 23:31:48 UTC

javac multiple packages

Sorry if I posted it second time, but I am still looking for a better way to solve the problem. 

I am working on a project that has 10 different java packages, and these java packages have no dependence on each other. 
 
To compile these packages, I may create 10 targets in the build.xml and compile them one after another, which I think it's a waste. 

Or, I may put these packages in a txt file and create one target to compile all source code together,  such as: 
<target Compile ... > 
     <javac srcdir="${src.dir}"
            destdir="${classes}"
            debug="${debug}"
            fork="true"
            optimize="{optimize}"
            includesfile="list.txt">
        <classpath refid="run.cp"/>
</target>

But in that case, if there is one single error in just one java file, the rest files will not be compiled!

I am looking for a way that I can do a loop and build these packages one after another, even there was an error, the loop continues ? 


-CJ



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


Re: javac multiple packages

Posted by Martin Gainty <mg...@hotmail.com>.
Did you try
<javac failonerror="false"
...
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Chun Ji" <CJ...@pro-unlimited.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Wednesday, July 19, 2006 5:31 PM
Subject: javac multiple packages 



Sorry if I posted it second time, but I am still looking for a better way to solve the problem. 

I am working on a project that has 10 different java packages, and these java packages have no dependence on each other. 
 
To compile these packages, I may create 10 targets in the build.xml and compile them one after another, which I think it's a waste. 

Or, I may put these packages in a txt file and create one target to compile all source code together,  such as: 
<target Compile ... > 
     <javac srcdir="${src.dir}"
            destdir="${classes}"
            debug="${debug}"
            fork="true"
            optimize="{optimize}"
            includesfile="list.txt">
        <classpath refid="run.cp"/>
</target>

But in that case, if there is one single error in just one java file, the rest files will not be compiled!

I am looking for a way that I can do a loop and build these packages one after another, even there was an error, the loop continues ? 


-CJ



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