Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composite Builds Hierarchical Multirepo Sample - fails when following the instructions #19953

Closed
maol74 opened this issue Feb 17, 2022 · 4 comments · Fixed by #20691
Closed
Assignees
Labels
a:documentation Documentation content in:composite-builds including BuildIdentifier @support Issues owned by GBT support team
Milestone

Comments

@maol74
Copy link

maol74 commented Feb 17, 2022

Expected Behavior

When download groovy sample zip for example https://docs.gradle.org/current/samples/sample_composite_builds_hierarchical_multirepo.html, unpack it and following the instruction the build fails

  • when running .\gradlew publishDeps it fails, example uses maven repo during publish not Ivy as configured
  • after cloning commons-lang, when running gradle --project-dir modules/commons-lang build the build fails during javadoc
  • after cloning commons-lang, when running gradle build the build fails with following error
* What went wrong:
Circular dependency between the following tasks:
:commons-lang:classes
\--- :commons-lang:compileJava
     \--- :commons-lang:jar
          \--- :commons-lang:classes (*)

(*) - details omitted (listed previously)

Current Behavior

Build fails, see description above

Context

Steps to Reproduce

See description above

Your Environment

Build scan URL:
Using gradlew bundled in the example

@ljacomet ljacomet added a:documentation Documentation content in:composite-builds including BuildIdentifier @support Issues owned by GBT support team and removed a:bug to-triage labels Feb 18, 2022
@ljacomet
Copy link
Member

ljacomet commented Feb 18, 2022

Looks like that sample expects too much to happen with defaults only. It most likely need a number of changes so that what it documents work ... and keeps working.

@maol74
Copy link
Author

maol74 commented Feb 19, 2022

I was most concerned about the Circular dependency error, can´t understand why that happens, could that be a bug?

@jvandort
Copy link
Member

jvandort commented May 6, 2022

There were definitely a lot of things wrong with this sample. Personally, I was not able to reproduce the circular dependency error you were seeing, but I was able to reproduce the rest. Following the directions line-by-line did not produce the circular dependency problem. Did you make any manual modifications to the sample files which may have caused that error?

@maol74
Copy link
Author

maol74 commented May 7, 2022

Hi!
You should be able to reproduce the "Circular dependency" error by doing this when clone the commons-lang project

  1. git clone http://gitbox.apache.org/repos/asf/commons-lang.git modules/commons-lang --branch master --depth 1
  2. ./gradlew --project-dir modules/commons-lang init
    I choose yes, 1, yes in the init questions
  3. ./gradlew run

Note that I´m using gradlew from root project, standing in root dir. I also cloned out master instead. Could also be the init choices perhaps, I choose yes, 1, yes?

FAILURE: Build failed with an exception.

  • What went wrong:
    Circular dependency between the following tasks:
    :commons-lang:classes
    --- :commons-lang:compileJava
    --- :commons-lang:jar
    --- :commons-lang:classes (*)

(*) - details omitted (listed previously)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:documentation Documentation content in:composite-builds including BuildIdentifier @support Issues owned by GBT support team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants