You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jean-Philippe Pattus <jp...@sogitec.fr> on 2003/12/19 10:37:30 UTC

ant 1..5.4 javac failonerror no classes generated

hello the list,
i'm trying to compile some sources. On my sources there are some errors, but i want to compile
all the sources. I set failonerror to false, javac compile the sources, but the .classes are not generated
in D:\Temp\bin.... It's bizarre, no?
I'm sure the problem is between my chair and my screen, but i dont find the solution, if you can help me....
 

	<!-- Compilation des sources -->	
	<javac srcdir="${srcInstallLocation}\source" destdir="D:\Temp\bin" debug="on" failonerror="false" >
		<!-- definition du classpath -->
		<classpath>
			<path>
				<fileset dir="${srcInstallLocation}\classpath">
					<include name="*.jar" />
					<include name="*.zip" />
				</fileset>
			</path>
		</classpath>
	</javac>	


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


Re: ant 1..5.4 javac failonerror no classes generated

Posted by Antoine Lévy-Lambert <an...@antbuild.com>.
Hi,
this is standard behavior of javac, you do not get any classes generated 
if one of the java files fails.
You can try to exclude from the fileset you want to compile the sources 
which are wrong (see the doc of the javac task to see how to nest 
filesets with sources).
The best thing to do however is to force the developers to fix the 
syntax errors or to move physically the bad sources outside of the 
repository location from which
you are taking the sources to compile.

for instance //repository/good ---> contains the normal stuff
                  //repository/bad    ---> contains classes that do not 
compile which are kept for historical reasons

Hopes this helps,

Antoine

Jean-Philippe Pattus wrote:

>hello the list,
>i'm trying to compile some sources. On my sources there are some errors, but i want to compile
>all the sources. I set failonerror to false, javac compile the sources, but the .classes are not generated
>in D:\Temp\bin.... It's bizarre, no?
>I'm sure the problem is between my chair and my screen, but i dont find the solution, if you can help me....
> 
>
>	<!-- Compilation des sources -->	
>	<javac srcdir="${srcInstallLocation}\source" destdir="D:\Temp\bin" debug="on" failonerror="false" >
>		<!-- definition du classpath -->
>		<classpath>
>			<path>
>				<fileset dir="${srcInstallLocation}\classpath">
>					<include name="*.jar" />
>					<include name="*.zip" />
>				</fileset>
>			</path>
>		</classpath>
>	</javac>	
>
>
>  
>


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