Spring Boot Maven Plugin - No BOOT-INF directory

前端 未结 5 1009
耶瑟儿~
耶瑟儿~ 2020-12-05 21:44

Between version 1.3.8.RELEASE of the spring-boot-maven-plugin and version 1.4.0.RELEASE - there has been a change in the generated package structure (if you extract the uber

5条回答
  •  孤街浪徒
    2020-12-05 22:13

    For me, the solution was a bit more insidious....I had the spring-boot-maven-plugin nested under pluginManagement, (see below). Doh!

    The nasty thing, is that when I'd run mvn spring-boot:run, spring boot comes up just fine, and runs app! It wasn't until we tried to deploy to PCF (as a spring-boot JAR), that we'd get an error that there was something wrong with format of the binary....

    
    
      
      
    
                     
          
            org.springframework.boot
            spring-boot-maven-plugin
            ${spring.boot.version}            
            
                
                    
                        repackage
                        build-info
                    
                
                                    
                                               
        
    
      
    
            
    
    
        
          org.springframework.boot
          spring-boot-maven-plugin
          ${spring.boot.version}            
          
              
                  
                      repackage
                      build-info
                  
              
                                  
                                 
    
      
    
    
    

    Once I removed the pluginManagement tags from the POM, I would now get the ./BOOT-INF structure. Please keep in mind that pluginManagement is typically for a parent-pom structure, where you want that plugin's config used across other modules.

提交回复
热议问题