[GRADLE-2819] Latest setupBuild plugin fails with StackOverflow Created: 02/Jul/13  Updated: 15/Sep/13  Resolved: 15/Sep/13

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 1.9-rc-1

Type: Bug
Reporter: Gradle Forums Assignee: René Gröschke (Inactive)
Resolution: Fixed Votes: 1


 Description   

When I try to convert Netty project to gradle using 1.7 nightly I get the following:

Caused by: java.lang.StackOverflowError
at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.generateFqn(Maven2Gradle.groovy:253)
at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.this$2$generateFqn(Maven2Gradle.groovy)
at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle$this$2$generateFqn.callCurrent(Unknown Source)
at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.generateFqn(Maven2Gradle.groovy:253)
at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.this$2$generateFqn(Maven2Gradle.groovy)
at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle$this$2$generateFqn.callCurrent(Unknown Source)
at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.generateFqn(Maven2Gradle.groovy:253)
at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle.this$2$generateFqn(Maven2Gradle.groovy)
at org.gradle.buildsetup.plugins.internal.maven.Maven2Gradle$this$2$generateFqn.callCurrent(Unknown Source)



 Comments   
Comment by michel@maas.tc [ 05/Aug/13 ]

I've run into the same problem.

Comment by Thomas Glaeser [ 12/Sep/13 ]

The release notes from the latest version 1.9-20130911220033+0000 claim that this is solved. Only thing changed seems to be the line number ...

at org.gradle.buildinit.plugins.internal.maven.Maven2Gradle.generateFqn(Maven2Gradle.groovy:213)
at org.gradle.buildinit.plugins.internal.maven.Maven2Gradle.this$2$generateFqn(Maven2Gradle.groovy)
at org.gradle.buildinit.plugins.internal.maven.Maven2Gradle$this$2$generateFqn.callCurrent(Unknown Source)

Any progress on this issue?

Comment by René Gröschke (Inactive) [ 12/Sep/13 ]

Hey Thomas,
I'm working on that and I really thought I solved it. As a reference project I used the netty project. Are you able to create a small selfcontained example that reflects your maven multi project structure? Do you reference external parent poms in your maven multimodule build?

Comment by René Gröschke (Inactive) [ 12/Sep/13 ]

Thanks for the pointer! I can reproduce the stackoverflow with this project and will have a look.

Comment by Thomas Glaeser [ 12/Sep/13 ]

This was quick. Thanks for looking into this. Looking forward to your findings!

Comment by René Gröschke (Inactive) [ 13/Sep/13 ]

It seems that the problem is a common parent which is != the gradle root project but part of the multi module build. In the opendaylight-controller maven build the rootproject (releasepom) references to common-parent which is in opendaylight/commons/parent

Comment by Thomas Glaeser [ 13/Sep/13 ]

Still, I guess it is valid Maven multi-project setup. What is the solution?

Comment by René Gröschke (Inactive) [ 13/Sep/13 ]

No doubt it's valid maven code but that brought in a circular project lookup in the maven2gradle conversion. I've committed a potential fix which should be in the next nightly.

Comment by Thomas Glaeser [ 13/Sep/13 ]

Thanks again for the quick response. With the latest nightly the conversion succeeds. However the compile than fails as some sub-projects POM references plugin 'xtend-maven-plugin' which seems to have no counterpart on the Gradle side. I guess it will be hard for Gradle to support all possible Maven projects out there.

Generated at Wed Jun 30 12:32:23 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.