Why is maven-war-plugin failing for web.xml missing if I configured it not to fail on missing web.xml?

后端 未结 3 414
南方客
南方客 2021-01-12 02:50

Here\'s a challenge: why is this build failing?

I have configured Maven\'s maven-war-plugin not to fail on an abscent web.xml file, it seems:

    <         


        
3条回答
  •  北恋
    北恋 (楼主)
    2021-01-12 03:30

    This should work:

    
            
                org.apache.maven.plugins
                maven-war-plugin
                
                    false
                
                
                    
                        prepare-war
                        prepare-package
                        
                            false
                            
                                
                                    true
                                    
                                
                                
                                    ${build.number}
                                    ${project.name}
                                    ${user.name}
                                    ${os.name}
                                    ${build.date}
                                
                            
                            
                                
                                    
                                    ./target/dist
                                
                            
                        
                    
                
            
    

    Please notice that the false section has been moved up to the plugin configuration rather than the execution.

提交回复
热议问题