How to put maven project version in war file manifest?

前端 未结 3 1643
旧时难觅i
旧时难觅i 2021-02-02 10:29

I need to have Maven insert the version number from the POM file into the manifest located in the WAR file under /WEB-INF/manifest.mf.

How do I do this? I was able to ea

3条回答
  •  梦如初夏
    2021-02-02 10:56

    Figured it out using the maven-war-plugin. See the configuration below:

    
         org.apache.maven.plugins
         maven-war-plugin
         2.1.1
         
             
                 
                     ${project.version}
                 
             
         
    
    

提交回复
热议问题