maven-replacer-plugin and multiple files

后端 未结 7 1199
执念已碎
执念已碎 2020-12-31 10:59

I wrote a Java Web Application where I replace URLs to static content at build time to add version information, primarely for caching.

For example, href=\"mya

7条回答
  •  清酒与你
    2020-12-31 11:47

    The includes tag works with version 1.5.2 as well, you just have to specify the basedir tag before includes, and put the filepath (excluding the filename) as the basedir value and just the filename as the include tag value. So in your case something like this should work:

    
          com.google.code.maven-replacer-plugin
          replacer
          1.5.2
          
            
              prepare-package
              
                replace
              
            
          
          
            ${project.build.directory}/myApp
            
              index.jsp
            
            
              
                %PROJECT_VERSION%
                ${project.version}
              
            
          
        
    

提交回复
热议问题