Gradle misbehaves when there is a cycle in the chain of parent POMs


(Lee Morris) #1

Hi

I’m trying to perform a build using a script that works just fine on our build server, but I get the following error when building locally. I’ve tried this on milestone 6 and 7, both give the same error. Does anyone have any ideas?

I notice “Caused by: java.lang.NumberFormatException: For input string: “61D??? ???”” in the log, but there’s no 61D in the pom file that it was checking when the error occurred.

Thanks Lee

Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo Download http://192.168.0.52:8081/artifactory/BTF_3rd_party/displaytag/displayta g/1.2/displaytag-1.2.pom > Building > :compileJava > Resolving dependencies ‘:compile’ > 4 KB/4 KB downlo > Building > :compileJava > Resolving dependencies ':compile’org.gradle.listener .ListenerNotificationException: Failed to notify output event listener.

at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDis patch.java:97)

at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDis patch.java:32)

at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocat ionHandler.invoke(ProxyDispatchAdapter.java:75)

at $Proxy0.onOutput(Unknown Source)

at org.gradle.logging.internal.OutputEventRenderer.onOutput(OutputEventR enderer.java:168)

at org.gradle.logging.internal.Slf4jLoggingConfigurer$Appender.append(Sl f4jLoggingConfigurer.java:158)

at org.gradle.logging.internal.Slf4jLoggingConfigurer$Appender.append(Sl f4jLoggingConfigurer.java:145)

at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:85)

at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders( AppenderAttachableImpl.java:53)

at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:282)

at ch.qos.logback.classic.Logger.callAppenders(Logger.java:269)

at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java: 470)

at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:424)

at ch.qos.logback.classic.Logger.error(Logger.java:587)

at org.gradle.messaging.dispatch.ExceptionTrackingFailureHandler.dispatc hFailed(ExceptionTrackingFailureHandler.java:32)

at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDis patch.java:92)

at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDis patch.java:32)

at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocat ionHandler.invoke(ProxyDispatchAdapter.java:75)

at $Proxy8.buildFinished(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionD ispatch.java:35)

at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionD ispatch.java:24)

at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDis patch.java:88)

at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDis patch.java:32)

at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocat ionHandler.invoke(ProxyDispatchAdapter.java:75)

at $Proxy8.buildFinished(Unknown Source)

at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle Launcher.java:113)

at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun cher.java:76)

at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:42 )

at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:28 )

at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionRe portingAction.java:32)

at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionRe portingAction.java:21)

at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.ex ecute(CommandLineActionFactory.java:238)

at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.ex ecute(CommandLineActionFactory.java:222)

at org.gradle.launcher.Main.doAction(Main.java:48)

at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:53)

at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:51)

at org.gradle.launcher.exec.Execution.execute(Execution.java:28)

at org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:39)

at org.gradle.launcher.Main.main(Main.java:39)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java: 51)

at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:33)

at org.gradle.launcher.GradleMain.main(GradleMain.java:24) Caused by: java.lang.NumberFormatException: For input string: “61D??? ???”

at java.lang.NumberFormatException.forInputString(NumberFormatException. java:48)

at java.lang.Integer.parseInt(Integer.java:458)

at java.lang.Integer.(Integer.java:660)

at org.fusesource.jansi.AnsiOutputStream.write(AnsiOutputStream.java:114 )

at java.io.FilterOutputStream.write(FilterOutputStream.java:108)

at java.io.PrintStream.write(PrintStream.java:430)

at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)

at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)

at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:85)

at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:168)

at java.io.PrintStream.write(PrintStream.java:477)

at java.io.PrintStream.print(PrintStream.java:619)

at java.io.PrintStream.append(PrintStream.java:1015)

at java.io.PrintStream.append(PrintStream.java:38)

at org.gradle.logging.internal.AnsiConsole.render(AnsiConsole.java:68)

at org.gradle.logging.internal.AnsiConsole.access$400(AnsiConsole.java:2 9)

at org.gradle.logging.internal.AnsiConsole$Screen.redraw(AnsiConsole.jav a:102)

at org.gradle.logging.internal.AnsiConsole$TextAreaImpl.doAppend(AnsiCon sole.java:225)

at org.gradle.logging.internal.AbstractStyledTextOutput.text(AbstractSty ledTextOutput.java:70)

at org.gradle.logging.internal.StyledTextOutputBackedRenderer$OutputEven tTextOutputImpl.doAppend(StyledTextOutputBackedRenderer.java:80)

at org.gradle.logging.internal.AbstractStyledTextOutput.text(AbstractSty ledTextOutput.java:70)

at org.gradle.logging.internal.StyledTextOutputEvent.render(StyledTextOu tputEvent.java:86)

at org.gradle.logging.internal.StyledTextOutputBackedRenderer.onOutput(S tyledTextOutputBackedRenderer.java:58)

at org.gradle.logging.internal.ProgressLogEventGenerator$Operation.compl eteHeader(ProgressLogEventGenerator.java:125)

at org.gradle.logging.internal.ProgressLogEventGenerator.doOutput(Progre ssLogEventGenerator.java:56)

at org.gradle.logging.internal.ProgressLogEventGenerator.onOutput(Progre ssLogEventGenerator.java:48)

at org.gradle.logging.internal.ConsoleBackedProgressRenderer.onOutput(Co nsoleBackedProgressRenderer.java:46)

at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionD ispatch.java:35)

at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionD ispatch.java:24)

at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDis patch.java:88)

… 49 more


(Szczepan Faber) #2

Can you give some details about the platform you run gradle? And also the output of gradle -v?

If you could also create a small project that reproduces the problem that would be awesome.

A workaround that might be useful for a time being is to run gradle in quiet mode. From the stack trace I gather that gradle is downloading dependencies and for one of those dependencies the progress logger cannot be notified and hence a failure. Maybe you could nail down this dependency and we could reproduce it.

Hope that helps!


(Lee Morris) #3

Thanks for the reply

I found the problem. We had a dependency on displaytag, which worked fine when pointing at maven central, but broke when pointing at our local artifactory. I compared the poms and somehow our pom had a parent project defined that referenced itself. It seemed to cause gradle to go into an infinite loop for a while and then crashed.

Not sure there’s anything to be done from a gradle perspective, although a more helpful error message would have been nice! :slight_smile:


(Peter Niederwieser) #4

Are you saying that one of the POMs was referencing itself as its parent? I think this should be handled gracefully. I’ve created a JIRA issue.


(Lee Morris) #5

Yes exactly, the parent artifact was displaytag-doc, but our incorrect pom had just displaytag. I’d copy and paste in the code but this comment is parsing the xml! if you give me the JIRA I’ll add a comment to it.