Maven 3 profile with extensions

前端 未结 3 923
清酒与你
清酒与你 2020-12-16 18:55

My question had been addressed in this thread, but the explanation is not clear.

I have this build definition in one of my pom.xml files:



        
3条回答
  •  余生分开走
    2020-12-16 19:26

    I think the solution is here http://maven.apache.org/guides/mini/guide-using-extensions.html

    Define a build section where extensions are defined and then into the profile set the attribute true ( like in the second profile shown below )

    
        
            
                org.apache.maven.wagon
                wagon-ssh
                2.9
            
        
    
    
    
        
            create-default
            
                true
                
                    build
                    full
                
            
            
                
                    
                        org.springframework.boot
                        spring-boot-maven-plugin
                        
                            
                                
                                    repackage
                                
                            
                        
                    
                
            
        
    
        
            create-core
            
                
                    build
                    full
                
            
            
                
                    
                        org.apache.maven.plugins
                        maven-jar-plugin
                        true
                        2.6
                        
                            import-station-core-${project.version}
                        
                        
                            
                                make-jar
                                package
                                
                                    jar
                                
                            
                        
                    
                
            
        
    
    

提交回复
热议问题