How to create empty folders with maven archetype?

后端 未结 3 1357
伪装坚强ぢ
伪装坚强ぢ 2021-02-01 20:54

There is an existing issue for this approach, located on Codehaus JIRA #ARCHETYPE-57, but all instructions listed in this ticket failed for me. Also the blog post of marekdec Ho

3条回答
  •  礼貌的吻别
    2021-02-01 21:45

    I solved this issue by adding the following configuration to the archetypes pom.xml build configuration.

    Assuming your archetype-metadata.xml configuration file's filesets is as follows:

    
     src
      
       **/**
      
    
    

    Add this to your pom.xml, not the one included with the archetype, the actual project pom.xml

    
      org.apache.maven.plugins
      maven-resources-plugin
      2.3
      
        true
      
    
    

    The xml configuration line which does the magic is

    true
    

    The full configuration will look as follows

    
    ...
    
        
            
                
                    org.apache.maven.plugins
                    maven-resources-plugin
                    2.3
                    
                        true
                    
                
    
            
        
    
    
    

提交回复
热议问题