Replace the web-console version in urlrewrite.xml during the build
Project: http://git-wip-us.apache.org/repos/asf/ode/repo Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/64b2e0b3 Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/64b2e0b3 Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/64b2e0b3 Branch: refs/heads/master Commit: 64b2e0b3c646a21910dfbb79c01b845f6e2360d2 Parents: 122b811 Author: sathwik <[email protected]> Authored: Wed Jun 28 21:06:04 2017 +0530 Committer: sathwik <[email protected]> Committed: Wed Jun 28 21:06:04 2017 +0530 ---------------------------------------------------------------------- Rakefile | 11 ++++++++++- axis2-war/src/main/webapp/WEB-INF/urlrewrite.xml | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ode/blob/64b2e0b3/Rakefile ---------------------------------------------------------------------- diff --git a/Rakefile b/Rakefile index 996f1b3..68b1c41 100644 --- a/Rakefile +++ b/Rakefile @@ -119,7 +119,16 @@ define "ode" do package(:war).tap do |root| root.merge(artifact(AXIS2_WAR)).include("WEB-INF/classes/org/*") end - + + #specify version of web console in urlrewrite.xml + build do + cp _("src/main/webapp/WEB-INF/urlrewrite.xml"), _(:target) + text = File.read(_(:target, "urlrewrite.xml")) + changed_text = text.gsub(/\$\{version\}/, artifact(ODE_WEB_CONSOLE).version) + File.open(_(:target, "urlrewrite.xml"),'w') {|f| f.puts changed_text} + package(:war).path("WEB-INF").include(_(:target, "urlrewrite.xml")) + end + task("start"=>[package(:war), jetty.use]) do |task| class << task ; attr_accessor :url, :path ; end task.url = "http://localhost:8080/ode" http://git-wip-us.apache.org/repos/asf/ode/blob/64b2e0b3/axis2-war/src/main/webapp/WEB-INF/urlrewrite.xml ---------------------------------------------------------------------- diff --git a/axis2-war/src/main/webapp/WEB-INF/urlrewrite.xml b/axis2-war/src/main/webapp/WEB-INF/urlrewrite.xml index 1562d93..b6fb06e 100644 --- a/axis2-war/src/main/webapp/WEB-INF/urlrewrite.xml +++ b/axis2-war/src/main/webapp/WEB-INF/urlrewrite.xml @@ -39,6 +39,6 @@ <condition type="request-uri" operator="notequal">/*/services/**</condition> <condition type="request-uri" operator="notequal">/*/deployment/**</condition> <from>/**</from> - <to>/webjars/ode-console/0.1.0-SNAPSHOT/$1</to> + <to>/webjars/ode-console/${version}/$1</to> </rule> </urlrewrite>
