title: updating jsp script tag during maven build phase
body: <p>I want to update content inside all script tags in jsp files present under src/main/webapp/jsp.
  How to do this during maven build phase?</p>
  
  <p>I am using java+spring+maven stack.</p>
  
  <p>Ok here is example of what I want to achieve:</p>
  
  <p>Source code:</p>
  
  <pre><code>&lt;%@ page contentType="text/html; charset=utf-8"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  
  &lt;%@ taglib prefix="s" uri="/struts-tags"  %&gt;
  &lt;script type="text/javascript" src="js/core/validator.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/app/util/core-util.js"&gt;&lt;/script&gt;
  &lt;div id="dataContainer"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>After maven build, this should be present in target folder</p>
  
  <pre><code>&lt;%@ page contentType="text/html; charset=utf-8"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  
  &lt;%@ taglib prefix="s" uri="/struts-tags"  %&gt;
  &lt;script type="text/javascript" src="js/core/validator.js?version='&lt;MD5SUM-of-js/core/validator.js&gt;'"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/app/util/core-util.js?version='&lt;MD5SUM-of-js/app/util/core-util.js&gt;'"&gt;&lt;/script&gt;
  &lt;div id="dataContainer"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Please note the version parameter at the end of src="".</p>
  
  <p><strong>Update:</strong> Finally, I was able to make it work following way. Feel free to suggest alternative if any.</p>
  
  <ol>
  <li><p>Prepared shell script to generate properties file something like this</p>
  
  <p>js/core/validator.js=js/core/validator.js?version\=MD5SUM-of-js/core/validator.js<br>
  js/app/util/core-util.js=js/app/util/core-util.js?version\=MD5SUM-of-js/app/util/core-util.js</p></li>
  <li><p>Configured maven-replacer-plugin to use this properties file as token value map and filter all the jsp files present under target/app/jsp folder.</p></li>
  </ol>