I have a common DTO in a separate project that is added to microservices as a dependency. I have a problem during the build of a Docker image. I get an error:
3.628 Daemon will be stopped at the end of the build 10.93 > Task :compileJava FAILED 10.93 10.93 FAILURE: Build failed with an exception. 10.93 10.93 * What went wrong: 10.93 Execution failed for task ':compileJava'. 10.93 > Could not resolve all files for configuration ':compileClasspath'. 10.93 > Could not find com.umaraliev:common:0.0.1-SNAPSHOT. 10.93 Required by: 10.93 root project :
My docker file
WORKDIR /app
COPY build.gradle settings.gradle ./
COPY gradlew ./
COPY gradle ./gradle
RUN chmod +x gradlew
RUN ./gradlew dependencies --no-daemon
COPY src ./src
RUN ./gradlew build --no-daemon
FROM eclipse-temurin:21-jre
WORKDIR /app
COPY --from=builder /app/build/libs/*.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]