[Back-end java] Executando Dockerfile (pagina 151-152)

Configurei os arquivos como descrito no livro e no repositório Github. Porém ao executar o comando mvn clean install na product-api, na user-api ou na shopping-api dá erro por não localizar as classes que estao sendo importadas da shopping-client.

[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] shopping-client 0.0.1-SNAPSHOT … SUCCESS [ 12.602 s]
[INFO] user-api 0.0.1-SNAPSHOT … FAILURE [ 2.893 s]
[INFO] product-api 0.0.1-SNAPSHOT … SKIPPED
[INFO] shopping-api 0.0.1-SNAPSHOT … SKIPPED
[INFO] gateway 0.0.1-SNAPSHOT … SKIPPED
[INFO] ecommerce-parent 1.0-SNAPSHOT … SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.341 s
[INFO] Finished at: 2024-02-12T01:03:58-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project user-api: Compilation failure: Compilation failure:
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/model/User.java:[3,35] package com.aasjunior.ecommerce.dto does not exist
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/model/User.java:[32,32] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.model.User
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/exception/advice/UserControllerAdvice.java:[12,35] package com.aasjunior.ecommerce.dto does not exist
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/exception/advice/UserControllerAdvice.java:[13,41] cannot find symbol
[ERROR] symbol: class UserNotFoundException
[ERROR] location: package com.aasjunior.ecommerce.exception
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/exception/advice/UserControllerAdvice.java:[20,40] cannot find symbol
[ERROR] symbol: class UserNotFoundException
[ERROR] location: class com.aasjunior.ecommerce.exception.advice.UserControllerAdvice
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/exception/advice/UserControllerAdvice.java:[20,12] cannot find symbol
[ERROR] symbol: class ErrorDTO
[ERROR] location: class com.aasjunior.ecommerce.exception.advice.UserControllerAdvice
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/exception/advice/UserControllerAdvice.java:[31,13] cannot find symbol
[ERROR] symbol: class ErrorDTO
[ERROR] location: class com.aasjunior.ecommerce.exception.advice.UserControllerAdvice
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[4,35] package com.aasjunior.ecommerce.dto does not exist
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[5,41] cannot find symbol
[ERROR] symbol: class UserNotFoundException
[ERROR] location: package com.aasjunior.ecommerce.exception
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[3,35] package com.aasjunior.ecommerce.dto does not exist
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[4,41] cannot find symbol
[ERROR] symbol: class UserNotFoundException
[ERROR] location: package com.aasjunior.ecommerce.exception
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[22,17] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.controller.UserController
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[27,12] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.controller.UserController
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[33,48] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.controller.UserController
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[33,12] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.controller.UserController
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[38,12] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.controller.UserController
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[47,54] cannot find symbol
[ERROR] symbol: class UserNotFoundException
[ERROR] location: class com.aasjunior.ecommerce.controller.UserController
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[52,17] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.controller.UserController
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[57,65] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.controller.UserController
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[57,12] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.controller.UserController
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/controller/UserController.java:[62,17] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.controller.UserController
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[22,17] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.service.UserService
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[30,12] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.service.UserService
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[36,25] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.service.UserService
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[36,12] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.service.UserService
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[43,12] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.service.UserService
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[51,12] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.service.UserService
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[59,17] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.service.UserService
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[67,42] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.service.UserService
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[67,12] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.service.UserService
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/service/UserService.java:[86,17] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.service.UserService
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/converter/DTOConverter.java:[4,35] package com.aasjunior.ecommerce.dto does not exist
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/converter/DTOConverter.java:[7,19] cannot find symbol
[ERROR] symbol: class UserDTO
[ERROR] location: class com.aasjunior.ecommerce.converter.DTOConverter
[ERROR] /E:/adeld/SpringBootProjects/Back-end_java/back-end-java/user-api/src/main/java/com/aasjunior/ecommerce/exception/advice/UserControllerAdvice.java:[19,23] cannot find symbol
[ERROR] symbol: class UserNotFoundException
[ERROR] location: class com.aasjunior.ecommerce.exception.advice.UserControllerAdvice
[ERROR] → [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] MojoFailureException - Apache Maven - Apache Software Foundation
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :user-api

Olá, você precisa rodar o comando mvn clean install no projeto shopping-client antes.

se você já rodou,verifique se está tudo certo nas dependências dos projetos user-api, product-api e shopping-api, eles precisam ter o shopping-client como dependência também.