#3914 : Maven2 output missing in case of compile error

When a compile error occurs using the Maven2 runner, the build log doesn't give the information anymore what caused the compile error.

Here are two similar build logs of a failing build, the first one being from TeamCity 1.2, the second one from #3914:

TeamCity 1.2 build log (with detailed error message):

Using compiler 'javac'.
-


BUILD FAILURE
-


Compilation failure D:\TeamCity\BuildAgent\work\2_Torino\TorinoMavenBuild\..\ZeissRichclient\src\main\java\de\zeiss\common\richclient\factory\CZTouchscreenComponentFactory.java:[16,7] de.zeiss.common.richclient.factory.CZTouchscreenComponentFactory is not abstract and does not override abstract method createInputField() in de.zeiss.common.richclient.factory.CZComponentFactory
-


Trace
org.apache.maven.BuildFailureException: Compilation failure
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:150)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:689)
at jetbrains.maven.Maven21Launcher.executeMaven(Maven21Launcher.java:116)
at jetbrains.maven.Maven21Launcher.main(Maven21Launcher.java:49)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:505)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 10 more
-


Total time: 31 seconds
Finished at: Tue Mar 20 13:57:14 CET 2007
Final Memory: 11M/35M
-


org.apache.maven.reactor.MavenExecutionException: Compilation failure
org.apache.maven.reactor.MavenExecutionException: Compilation failure
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:174)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:689)
at jetbrains.maven.Maven21Launcher.executeMaven(Maven21Launcher.java:116)
at jetbrains.maven.Maven21Launcher.main(Maven21Launcher.java:49)
Caused by: org.apache.maven.BuildFailureException: Compilation failure
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:150)
... 3 more
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:505)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 10 more



And here the much shorter output from Agra:

:
: Using compiler 'javac'.
: Compiling 51 source files to C:\BuildAgent\work\Agent\Torino\TorinoMavenBuild\..\ZeissRichclient\target\classes
: Project build failed. Compilation failure
: Number of processed tests: 10
: Maven2 output:
Running de.zeiss.common.gui.comps.CResourceBundleTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec

Results :

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0


The Agra output is useless, as it doesn't include the compiler message!

3 comments
Comment actions Permalink

Hello Tobias,

This problem was introduced when migrating from Maven 2.1 snapshot to Maven
2.0.5 and is already fixed in the Agra trunk. The fix will be included into
the next EAP.

Thank you for reporting.

When a compile error occurs using the Maven2 runner, the build log
doesn't give the information anymore what caused the compile error.

Here are two similar build logs of a failing build, the first one
being from TeamCity 1.2, the second one from #3914:

TeamCity 1.2 build log (with detailed error message):

Using compiler 'javac'.

----------------------------------------------------------------------
--

BUILD FAILURE

----------------------------------------------------------------------
--

Compilation failure
D:\TeamCity\BuildAgent\work\2_Torino\TorinoMavenBuild\..\ZeissRichclie
nt\src\main\java\de\zeiss\common\richclient\factory\CZTouchscreenCompo
nentFactory.java:[16,7]
de.zeiss.common.richclient.factory.CZTouchscreenComponentFactory is
not abstract and does not override abstract method createInputField()
in de.zeiss.common.richclient.factory.CZComponentFactory

----------------------------------------------------------------------
--

Trace

org.apache.maven.BuildFailureException: Compilation failure

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defau
ltLifecycleExecutor.java:555)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLif
ecycle(DefaultLifecycleExecutor.java:475)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defaul
tLifecycleExecutor.java:454)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHand
leFailures(DefaultLifecycleExecutor.java:306)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegment
s(DefaultLifecycleExecutor.java:273)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLif
ecycleExecutor.java:140)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:150)

at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:689
)

at
jetbrains.maven.Maven21Launcher.executeMaven(Maven21Launcher.java:116)

at jetbrains.maven.Maven21Launcher.main(Maven21Launcher.java:49)

Caused by: org.apache.maven.plugin.CompilationFailureException:
Compilation failure

at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerM
ojo.java:505)

at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)

at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugin
Manager.java:412)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defau
ltLifecycleExecutor.java:534)

.. 10 more

----------------------------------------------------------------------
--

Total time: 31 seconds

Finished at: Tue Mar 20 13:57:14 CET 2007

Final Memory: 11M/35M

----------------------------------------------------------------------
--

org.apache.maven.reactor.MavenExecutionException: Compilation failure

org.apache.maven.reactor.MavenExecutionException: Compilation failure

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:174)

at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:689
)

at
jetbrains.maven.Maven21Launcher.executeMaven(Maven21Launcher.java:116)

at jetbrains.maven.Maven21Launcher.main(Maven21Launcher.java:49)

Caused by: org.apache.maven.BuildFailureException: Compilation failure

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defau
ltLifecycleExecutor.java:555)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLif
ecycle(DefaultLifecycleExecutor.java:475)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defaul
tLifecycleExecutor.java:454)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHand
leFailures(DefaultLifecycleExecutor.java:306)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegment
s(DefaultLifecycleExecutor.java:273)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLif
ecycleExecutor.java:140)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:150)

.. 3 more

Caused by: org.apache.maven.plugin.CompilationFailureException:
Compilation failure

at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerM
ojo.java:505)

at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)

at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugin
Manager.java:412)

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defau
ltLifecycleExecutor.java:534)

.. 10 more

And here the much shorter output from Agra:

:

: Using compiler 'javac'.

: Compiling 51 source files to
C:\BuildAgent\work\Agent\Torino\TorinoMavenBuild\..\ZeissRichclient\ta
rget\classes

: Project build failed. Compilation failure

: Number of processed tests: 10

: Maven2 output:

Running de.zeiss.common.gui.comps.CResourceBundleTest

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047
sec

Results :

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

The Agra output is useless, as it doesn't include the compiler
message!

WBR,
Sergey Anchipolevsky


0
Comment actions Permalink

I was testing this one in #3989 and the good news is that it now works.
However I noticed these two points:

1) I ran a personal build to provoke a compile error. In the web interface, the build log contains lines like these:

: Building in C:\BuildAgent\work\Agent\Network_Broker
: Updating svn in C:\BuildAgent\work\Agent\Network_Broker

The same build log lines viewed in the IDEA plugin window look like these:

Building in C:\BuildAgent\work\Agent\Network_Broker
Updating svn in C:\BuildAgent\work\Agent\Network_Broker

The time stamps are broken in the IDEA plugin view.

2) The build results page now says "[15:01:55]: Compilation failure" in red.
After this, some Maven output about successful Junit tests is shown in orange.
The compiler error message only appears when I click on the Build Log page. There, it says the following in orange:

: BUILD FAILURE
: Compilation failure C:\BuildAgent\work\Agent\Network_Broker\NetworkBrokerMavenBuild\..\ImageConverter\src\main\java\de\czms\hydra\imageconverter\RLEHeader.java:[36,20] ';' expected C:\BuildAgent\work\Agent\Network_Broker\NetworkBrokerMavenBuild\..\ImageConverter\src\main\java\de\czms\hydra\imageconverter\RLEHeader.java:[37,12] ]]> expected

followed by a red "Compilation failure".

Imho, the exact compiler error message should already be included on the results page and it should be in red so the user doesn't have to look at the build log to figure out what went wrong.
Maven output about successful run tests shouldn't be rendered in orange, at least not on the results page.

0
Comment actions Permalink

Hello Tobias,

I reproduced the problem with timestamps. Thank you for reporting.

As for 2), in fact a compiler message does appear on the result page, but
only if there are no tests already executed.
We've got a more general issue related to this subject. See http://www.jetbrains.net/jira/browse/TW-2022.
You can post your considerations into there.

I was testing this one in #3989 and the good news is that it now
works. However I noticed these two points:

1) I ran a personal build to provoke a compile error. In the web
interface, the build log contains lines like these:

: Building in C:\BuildAgent\work\Agent\Network_Broker
: Updating svn in C:\BuildAgent\work\Agent\Network_Broker

The same build log lines viewed in the IDEA plugin window look like
these:

Building in C:\BuildAgent\work\Agent\Network_Broker
Updating svn in C:\BuildAgent\work\Agent\Network_Broker

The time stamps are broken in the IDEA plugin view.

2) The build results page now says "[15:01:55]: Compilation failure"
in red.

After this, some Maven output about successful Junit tests is shown in
orange.

The compiler error message only appears when I click on the Build Log
page. There, it says the following in orange:

: BUILD FAILURE
: Compilation failure
C:\BuildAgent\work\Agent\Network_Broker\NetworkBrokerMavenBuild\..\Ima
geConverter\src\main\java\de\czms\hydra\imageconverter\RLEHeader.java:
';' expected
C:\BuildAgent\work\Agent\Network_Broker\NetworkBrokerMavenBuild\..\Ima
geConverter\src\main\java\de\czms\hydra\imageconverter\RLEHeader.java:
<identifier> expected
followed by a red "Compilation failure".

Imho, the exact compiler error message should already be included on
the results page and it should be in red so the user doesn't have to
look at the build log to figure out what went wrong.

Maven output about successful run tests shouldn't be rendered in
orange, at least not on the results page.

WBR,
Sergey Anchipolevsky


0

Please sign in to leave a comment.