maven打包spring boot jar没有 BOOT-INF目录解决方案

##查看项目里面是否有引入spring-boot-maven-plugin


          org.springframework.boot
          spring-boot-maven-plugin
       

##如果有引入,还不行

##查看pom.xml是否有pluginManagement标签,去掉pluginManagement就行了


    
      
        
        
          maven-clean-plugin
          3.1.0
        
        
        
          maven-resources-plugin
          3.0.2
        
        
          maven-compiler-plugin
          3.8.0
        
        
          maven-surefire-plugin
          2.22.1
        
        
          org.springframework.boot
          spring-boot-maven-plugin
        
        
          maven-install-plugin
          2.5.2
        
        
          maven-deploy-plugin
          2.8.2
        
        
        
          maven-site-plugin
          3.7.1
        
        
          maven-project-info-reports-plugin
          3.0.0
        
      
    
  

##去掉pluginManagement标签


      
        
        
          maven-clean-plugin
          3.1.0
        
        
        
          maven-resources-plugin
          3.0.2
        
        
          maven-compiler-plugin
          3.8.0
        
        
          maven-surefire-plugin
          2.22.1
        
        
          org.springframework.boot
          spring-boot-maven-plugin
        
        
          maven-install-plugin
          2.5.2
        
        
          maven-deploy-plugin
          2.8.2
        
        
        
          maven-site-plugin
          3.7.1
        
        
          maven-project-info-reports-plugin
          3.0.0
        
      
  

你可能感兴趣的:(maven,spring,boot,jar)