Trying Gradle build - “Task 'build' not found in root project”

前端 未结 3 1738
情深已故
情深已故 2020-12-15 03:34

I just started to read \"Pro Spring MVC with web flow\" and it comes with a code sample that I want to follow.

  • What I want - I want to build
相关标签:
3条回答
  • 2020-12-15 04:02

    run

    gradle clean 
    

    then try

    gradle build 
    

    it worked for me

    0 讨论(0)
  • 2020-12-15 04:02

    Check your file: settings.gradle for presence lines with included subprojects (for example: include chapter1-bookstore )

    0 讨论(0)
  • 2020-12-15 04:07

    You didn't do what you're being asked to do.

    What is asked:

    I have to execute ../gradlew build

    What you do

    cd ..
    gradlew build
    

    That's not the same thing.

    The first one will use the gradlew command found in the .. directory (mdeinum...), and look for the build file to execute in the current directory, which is (for example) chapter1-bookstore.

    The second one will execute the gradlew command found in the current directory (mdeinum...), and look for the build file to execute in the current directory, which is mdeinum....

    So the build file executed is not the same.

    0 讨论(0)
提交回复
热议问题