Reputation: 9886
I just started reading "Pro Spring MVC with web flow" and it comes with a code sample that I want to follow.
Gradle
Gradle
before and when I try to execute what I'm thinking I have to I get this error Task 'build' not found in root project
Gradle
from the official site and get it to work. Today when I actually tried to execute the steps from the book it turns out that the sample code comes with its own Gradle distribution and I executed it which I think followed to getting a second distribution of Gradle. However, I don't know if this may be a problem or not. now my directory with the sample code looks like this:
Then it's written that I have to execute ../gradlew build
which I execute like this and get the following:
appendixA-bookstore
folder in case Gradle recognize all directories as different builds but no success.Gradle
setup which as I wrote did yesterday and what exactly should I do to use this sample code with my fresh and original Gradle setup?Upvotes: 50
Views: 304304
Reputation: 11
If you are using gradle 7.5.1 then you need to run the command as
$ gradle tasks <taskname>
So in your case the task name would be the one found under chapter folders.
Upvotes: 1
Reputation: 61
Check your file: settings.gradle
for presence lines with included subprojects (for example:
include chapter1-bookstore
)
Upvotes: 6
Reputation: 692181
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.
Upvotes: 40