You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by sa...@apache.org on 2016/09/29 17:17:24 UTC

ode git commit: ODE-1028: Integrated new ODE Web Console

Repository: ode
Updated Branches:
  refs/heads/ode-1.3.x 44a1f7df4 -> 8847472b5


ODE-1028: Integrated new ODE Web Console


Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/8847472b
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/8847472b
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/8847472b

Branch: refs/heads/ode-1.3.x
Commit: 8847472b5bdf87a0cc1a70c899e9f06bcbe4c47e
Parents: 44a1f7d
Author: sathwik <sa...@apache.org>
Authored: Thu Sep 29 20:21:33 2016 +0530
Committer: sathwik <sa...@apache.org>
Committed: Thu Sep 29 20:21:33 2016 +0530

----------------------------------------------------------------------
 Rakefile                                        | 20 +----
 .../src/main/webapp/WEB-INF/urlrewrite.xml      | 41 +++++++++
 axis2-war/src/main/webapp/WEB-INF/web.xml       | 11 +++
 dependencies.rb                                 |  5 +-
 tomee-server/src/main/webapp/WEB-INF/web.xml    | 88 ++++++++++++++++++++
 5 files changed, 148 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/8847472b/Rakefile
----------------------------------------------------------------------
diff --git a/Rakefile b/Rakefile
index 5339577..686e8a5 100644
--- a/Rakefile
+++ b/Rakefile
@@ -107,7 +107,7 @@ define "ode" do
       JAVAX.connector, JAVAX.jms, JAVAX.persistence, JAVAX.transaction, JAVAX.stream,  JIBX,
       GERONIMO.connector, GERONIMO.kernel, GERONIMO.transaction, LOG4J2, OPENJPA, SAXON, TRANQL,
       WOODSTOX, WSDL4J, WS_COMMONS, XALAN, XERCES, XMLBEANS, SPRING,
-      AXIS2_MODULES.libs, H2::REQUIRES, SLF4J
+      AXIS2_MODULES.libs, H2::REQUIRES, SLF4J, ODE_WEB_CONSOLE, TUCKEY_URLREWRITE
 
     package(:war).with(:libs=>libs).path("WEB-INF").tap do |web_inf|
       web_inf.merge project("dao-jpa-ojpa-derby").package(:zip)
@@ -707,8 +707,7 @@ define "ode" do
     tomee_libs = projects("tomee"), TOMEE, DERBY, DERBY_TOOLS, SLF4J, LOG4J2
 
     #liraries to be rmomved from ODE war
-    rm_libs = GERONIMO, JAVAX.transaction, JAVAX.connector, JAVAX.ejb, JAVAX.javamail, JAVAX.jms, JAVAX.persistence, JAVAX.resource, DERBY, DERBY_TOOLS, SLF4J, LOG4J2, OPENJPA, TRANQL,
-            artifacts(AXIS2_MODULES.libs).keep_if {|a| a.group == 'velocity' && a.id == 'velocity'}
+    rm_libs = GERONIMO, JAVAX.transaction, JAVAX.connector, JAVAX.ejb, JAVAX.javamail, JAVAX.jms, JAVAX.persistence, JAVAX.resource, DERBY, DERBY_TOOLS, SLF4J, LOG4J2, OPENJPA, TRANQL, artifacts(AXIS2_MODULES.libs).keep_if {|a| a.group == 'velocity' && a.id == 'velocity'}
 
     # extract ode war
     exploded_ode = unzip(_(:target, 'ode') => project("ode:axis2-war").package(:war)).target
@@ -727,20 +726,9 @@ define "ode" do
         #remove classes folder, as there is nothing
         remove_entry_secure _(:target, "ode/WEB-INF/classes/")
 
-      # add resources to web.xml
-      resourcesxml  = Nokogiri::XML <<-eos
-        <resource-ref>
-            <res-ref-name>jdbc/ode</res-ref-name>
-            <res-type>javax.sql.DataSource</res-type>
-            <res-auth>Container</res-auth>
-            <res-sharing-scope>Shareable</res-sharing-scope>
-        </resource-ref>
-      eos
+        #copy Servlet 3.0 enabled web.xml
+        cp path_to("src/main/webapp/WEB-INF/web.xml"), _(:target, "ode/WEB-INF/web.xml")
 
-      webxml = Nokogiri::XML(File.open(_(:target, "ode/WEB-INF/web.xml")))
-      webxml.xpath('//xmlns:web-app').first.add_child(resourcesxml.root)
-
-      File.open(_(:target, "ode/WEB-INF/web.xml"),'w') {|f| webxml.write_xml_to f}
 
       # add TomcatFactory to ode-axis2.properties
       File.open(_(:target, "ode/WEB-INF/conf/ode-axis2.properties"), 'a') do |file|

http://git-wip-us.apache.org/repos/asf/ode/blob/8847472b/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
new file mode 100644
index 0000000..f950be9
--- /dev/null
+++ b/axis2-war/src/main/webapp/WEB-INF/urlrewrite.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 4.0//EN"
+        "http://www.tuckey.org/res/dtds/urlrewrite4.0.dtd">
+
+<!--
+
+    Configuration file for UrlRewriteFilter
+    http://www.tuckey.org/urlrewrite/
+
+-->
+<urlrewrite>
+
+    <rule>
+        <note>
+            The rule means that requests to /ode will be redirected to 
+            /ode/webjars/ode-console/${version} the url will be rewritten.
+        </note>
+        <from>^/$</from>
+        <to type="redirect">webjars/ode-console/0.1.0-SNAPSHOT</to>
+    </rule>
+</urlrewrite>
+

http://git-wip-us.apache.org/repos/asf/ode/blob/8847472b/axis2-war/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/axis2-war/src/main/webapp/WEB-INF/web.xml b/axis2-war/src/main/webapp/WEB-INF/web.xml
index 42e2062..edda06b 100644
--- a/axis2-war/src/main/webapp/WEB-INF/web.xml
+++ b/axis2-war/src/main/webapp/WEB-INF/web.xml
@@ -37,6 +37,17 @@
     </listener>
 
     <filter>
+        <filter-name>UrlRewriteFilter</filter-name>
+        <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
+    </filter>
+    <filter-mapping>
+        <filter-name>UrlRewriteFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+        <dispatcher>REQUEST</dispatcher>
+        <dispatcher>FORWARD</dispatcher>
+    </filter-mapping>
+
+    <filter>
         <filter-name>log4jServletFilter</filter-name>
         <filter-class>org.apache.logging.log4j.web.Log4jServletFilter</filter-class>
     </filter>

http://git-wip-us.apache.org/repos/asf/ode/blob/8847472b/dependencies.rb
----------------------------------------------------------------------
diff --git a/dependencies.rb b/dependencies.rb
index 6b0ce84..85d549b 100644
--- a/dependencies.rb
+++ b/dependencies.rb
@@ -274,4 +274,7 @@ TOMEE = struct(
         :oro => "oro:oro:jar:2.0.8",
         :openjpa => ["org.apache.openjpa:openjpa:jar:2.4.1","net.sourceforge.serp:serp:jar:1.15.1"]
 
-)
\ No newline at end of file
+)
+
+ODE_WEB_CONSOLE     = "org.apache.ode:ode-console:jar:0.1.0-SNAPSHOT"
+TUCKEY_URLREWRITE   = "org.tuckey:urlrewritefilter:jar:4.0.4"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ode/blob/8847472b/tomee-server/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/tomee-server/src/main/webapp/WEB-INF/web.xml b/tomee-server/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..1cef6f7
--- /dev/null
+++ b/tomee-server/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+  <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" 
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+    <display-name>Apache-Axis2</display-name>
+
+    <filter>
+        <filter-name>UrlRewriteFilter</filter-name>
+        <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
+    <init-param>
+        <param-name>confReloadCheckInterval</param-name>
+        <param-value>10</param-value>
+    </init-param>
+    </filter>
+    <filter-mapping>
+        <filter-name>UrlRewriteFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+        <dispatcher>REQUEST</dispatcher>
+        <dispatcher>FORWARD</dispatcher>
+    </filter-mapping>
+
+    <servlet>
+        <display-name>Apache-Axis Servlet</display-name>
+        <servlet-name>AxisServlet</servlet-name>
+        <servlet-class>org.apache.ode.axis2.hooks.ODEAxisServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>AxisServlet</servlet-name>
+        <url-pattern>/servlet/AxisServlet</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>AxisServlet</servlet-name>
+        <url-pattern>*.jws</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>AxisServlet</servlet-name>
+        <url-pattern>/services/*</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>AxisServlet</servlet-name>
+        <url-pattern>/processes/*</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>AxisServlet</servlet-name>
+        <url-pattern>/deployment/*</url-pattern>
+    </servlet-mapping>
+
+   <welcome-file-list>
+      <welcome-file>/index.html</welcome-file>
+    </welcome-file-list>
+
+    <error-page>
+      <error-code>404</error-code>
+      <location>/404.html</location>
+    </error-page>
+
+    <resource-ref>
+        <res-ref-name>jdbc/ode</res-ref-name>
+        <res-type>javax.sql.DataSource</res-type>
+        <res-auth>Container</res-auth>
+        <res-sharing-scope>Shareable</res-sharing-scope>
+    </resource-ref>
+</web-app>
\ No newline at end of file