Maven/Docker: cache all dependencies

前端 未结 1 739
轻奢々
轻奢々 2021-01-06 05:03

I\'m trying to build/deploy a spring boot in a docker container.

FROM maven:3.5.3-jdk-8-slim AS build
COPY ./pom.xml /app/pom.xml
RUN cd /app
RUN mvn -f /app         


        
1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-06 05:35

    I finally find the solution by using go-offline-maven-plugin.

             
                de.qaware.maven
                go-offline-maven-plugin
                1.0.0
                
                    
                        
                            org.apache.maven.surefire
                            surefire-junit4
                            2.20.1
                            PLUGIN
                        
                    
                
            
    

    And trying to get all dependencies using:

    mvn de.qaware.maven:go-offline-maven-plugin:resolve-dependencies
    

    0 讨论(0)
提交回复
热议问题