How to add a file to a war with Maven

前端 未结 1 1703
死守一世寂寞
死守一世寂寞 2020-12-30 07:24

I have developed a maven plugin that downloads the release notes from JIRA. It\'s bound by default to the \'generate-sources\' phase and creates a \'release.txt\' file in th

1条回答
  •  旧时难觅i
    2020-12-30 07:43

    I think this can be done using this feature of that plugin:

    Adding and Filtering External Web Resources: http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html

    Which would allow you to generate your release.txt into a separate folder (not src) and have the plugin treat it as an extra resources folder.

    Hope that helps.

     
      org.apache.maven.plugins 
      maven-war-plugin 
       
         
           
            ${project.build.directory} 
            WEB-INF 
             
              release.txt 
             
           
         
       
     
    

    0 讨论(0)
提交回复
热议问题