ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: XMLLoger writes wrong javac output
Date Wed, 26 Nov 2003 13:23:07 GMT
It appears that there is a mismatch of treatment of std error
depending on whether javac/java/junit (and others) is forked or not.

If javac is forked, it sets up a LogOutputStream with a
log level of MSG_WARN for std error:
(Redirector#createStreams:269)

If javac is not forked, the std error has a log level of MSG_ERR:
(Project#demuxOutput called from DemuxOutputStream#processBuffer)

Peter
On Tuesday 25 November 2003 10:44, Matthias P. wrote:
> Hi everybody,
>
> i have a strange behavior with cruisecontrol and ant: When compiling with
> JDK 1.4 compile errors are written in the xml-log "log.xml" with the
> message priority "error". When compiling with JDK 1.3 they have the
> priority "warn". This confuses my cruisecontrol output xslt...
>
> Here is the concrete case:
> We were used to compile our source code with a JDK 1.4.2_02. and the
> property build.compiler=1.3. This works very well. Last week we had
> problems with an external lib. We solved the problem by compiling explicit
> with the JDK 1.3.1_07.
>
>             <javac srcdir="${test.src.mifclient.dir}"
>                 destdir="${test.build.mifclient.dir}"
>                 debug="${build.debug}"
>                 debuglevel="${build.debuglevel}"
>                 deprecation="${build.deprecation}"
>                 failonerror="true"
>                 fork="true"
>                 executable="C:\jdk1.3.1_07\bin\javac.exe">
>                 <classpath refid="test.classpath"/>
>             </javac>
>
> This works very well, but the xml log changed (mention the message priority
> "warn"):
>
> <target name="compile-mifclient-test" time="7 seconds">
>   <task location="file:D:/mif/buildbase/build/build.xml:623: " name="if"
> time="0 seconds"></task>
>   <task location="file:D:/mif/buildbase/build/build.xml:631: " name="echo"
> time="0 seconds">
>     <message priority="warn"><![CDATA[Compiles MIFClient
> Testcode]]></message>
>   </task>
>   <task location="file:D:/mif/buildbase/build/build.xml:639: " name="javac"
> time="7 seconds">
>     <message priority="info"><![CDATA[Compiling 66 source files to
> D:\mif\buildbase\build\MAINDEVELOPMENT-hourly\build\test\classes\MIFClient]
>]></message> <message
> priority="warn"><![CDATA[D:\mif\buildbase\build\MAINDEVELOPMENT-hourly\src\
>test\MIFClient\com\dcx\mif\client\gui\consolidation\AbstractTestNavigationAM
>.java:7: cannot resolve symbol]]></message> <message
> priority="warn"><![CDATA[symbol  : class NavigationAM ]]></message>
>     <message priority="warn"><![CDATA[location: package gui]]></message>
>     <message priority="warn"><![CDATA[import
> com.dcx.mif.client.gui.NavigationAM;]]></message>
>     <message priority="warn"><![CDATA[
> ^]]></message>
>
> When compiling with the JDK 1.4.2_02 the message priority is "error". Then
> the JDK is set by JAVA_HOME and i am not using the <executable> element of
> the <javac> task.
>
> Does anyone has a solution for it???
>
> Thanks,
> Matthias


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


Mime
View raw message