in28minutes / spring-microservices-v2

Microservices + Spring Boot 2 + Spring Cloud + Docker + Kubernetes - https://www.udemy.com/course/microservices-with-spring-boot-and-spring-cloud/. Latest Repo - http://github.com/in28minutes/spring-microservices-v3
751 stars 963 forks source link

spring-boot-maven-plugin:2.5.5:build-image #16

Closed dreamteam012020 closed 3 years ago

dreamteam012020 commented 3 years ago

Hi,

When I run below command -> D:\Projects\spring-cloud\currency-exchange-service>mvn spring-boot:build-image -DskipTests

These logs are produced and build get stuck...it is moving even after 5-6 hours

INFO] Scanning for projects... [INFO] [INFO] ------------< com.microservices:currency-exchange-service >------------- [INFO] Building currency-exchange-service 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] >>> spring-boot-maven-plugin:2.5.5:build-image (default-cli) > package @ currency-exchange-service >>> [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ currency-exchange-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ currency-exchange-service --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ currency-exchange-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory D:\Projects\spring-cloud\currency-exchange-service\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ currency-exchange-service --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ currency-exchange-service --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ currency-exchange-service --- [INFO] Building jar: D:\Projects\spring-cloud\currency-exchange-service\target\currency-exchange-service-0.0.1-SNAPSHOT.jar [INFO] [INFO] --- spring-boot-maven-plugin:2.5.5:repackage (repackage) @ currency-exchange-service --- [INFO] Replacing main artifact with repackaged archive [INFO] [INFO] <<< spring-boot-maven-plugin:2.5.5:build-image (default-cli) < package @ currency-exchange-service <<< [INFO] [INFO] [INFO] --- spring-boot-maven-plugin:2.5.5:build-image (default-cli) @ currency-exchange-service ---

Stuck at above line.

dreamteam012020 commented 3 years ago

Fixed I was making typo.

    <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <image>
                    <name>dockerAccountId/mmv2-${project.artifactId}:${project.version}</name>
                </image>
                <pullPolicy>IF_NOT_PRESENT</pullPolicy>
            </configuration>
        </plugin>