Skip to Content
0
Jan 31, 2023 at 11:42 AM

Error in step 6 of CAP tutorial Reuse a CAP Java Service

164 Views

At step 6 of the tutorial https://developers.sap.com/tutorials/cp-cap-java-service-reuse.html, I get an error after executing command 'mvn spring-boot:run'.

Below is the log:

user: bookstore $ mvn spring-boot:run

user: bookstore $ mvn spring-boot:run

[INFO] Scanning for projects...

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Build Order:

[INFO]

[INFO] bookstore parent [pom]

[INFO] bookstore [jar]

[INFO]

[INFO] --------------------< com.sap.cap:bookstore-parent >--------------------

[INFO] Building bookstore parent 1.0.0-SNAPSHOT [1/2]

[INFO] --------------------------------[ pom ]---------------------------------

[INFO]

[INFO] >>> spring-boot-maven-plugin:2.7.8:run (default-cli) > test-compile @ bookstore-parent >>>

[INFO]

[INFO] --- maven-enforcer-plugin:3.1.0:enforce (Project Structure Checks) @ bookstore-parent ---

[ERROR] Rule 1: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:

Detected JDK Version: 11.0.6-0 is not in the allowed range 17.

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary for bookstore parent 1.0.0-SNAPSHOT:

[INFO]

[INFO] bookstore parent ................................... FAILURE [ 0.323 s]

[INFO] bookstore .......................................... SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 0.542 s

[INFO] Finished at: 2023-01-31T11:34:22Z

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.1.0:enforce (Project Structure Checks) on project bookstore-parent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Can someone help me with resolving the issue?

Regards,

sally