Commit 3fa2135c authored by Bill Lynch's avatar Bill Lynch Committed by bill

JM-151 -- add ability to register servlets in a plugin


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@934 b35dd754-fafc-0310-a699-88a17e54d16e
parent 13cfea70
...@@ -762,8 +762,7 @@ ...@@ -762,8 +762,7 @@
</copy> </copy>
<!-- Copy the plugin.xml file to the target dir, code below assumes it's there --> <!-- Copy the plugin.xml file to the target dir, code below assumes it's there -->
<copy todir="${plugin.dest.dir}/@{plugin}" file="@{pluginsrc}/@{plugin}/plugin.xml" <copy todir="${plugin.dest.dir}/@{plugin}" file="@{pluginsrc}/@{plugin}/plugin.xml" />
overwrite="true" />
<!-- JSPC any JSP pages. Do this conditionally as there might not be a web dir. --> <!-- JSPC any JSP pages. Do this conditionally as there might not be a web dir. -->
<available property="plugin.@{plugin}.webdocs.available" <available property="plugin.@{plugin}.webdocs.available"
...@@ -785,6 +784,7 @@ ...@@ -785,6 +784,7 @@
<fileset dir="@{pluginsrc}/@{plugin}/src/web" /> <fileset dir="@{pluginsrc}/@{plugin}/src/web" />
<fileset dir="${web.dir}"> <fileset dir="${web.dir}">
<include name="WEB-INF/**/*.*" /> <include name="WEB-INF/**/*.*" />
<exclude name="WEB-INF/web.xml" />
<exclude name="WEB-INF/web.xml.startup.servlet" /> <exclude name="WEB-INF/web.xml.startup.servlet" />
<exclude name="WEB-INF/classes/messenger_init.xml" /> <exclude name="WEB-INF/classes/messenger_init.xml" />
<exclude name="WEB-INF/tmp/**/*.*" /> <exclude name="WEB-INF/tmp/**/*.*" />
...@@ -813,29 +813,28 @@ ...@@ -813,29 +813,28 @@
/> />
<!-- Use xmltask to merge the generated web.xml file and a developer one (if any) --> <!-- Use xmltask to merge the generated web.xml file and a developer one (if any) -->
<available property="plugin.@{plugin}.webxml.available"
<!-- type="file" file="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml" />
<copy tofile="${plugin.dest.dir}/@{plugin}/plugin_temp.xml" file="${plugin.dest.dir}/@{plugin}/plugin.xml" <if>
overwrite="true" /> <equals arg1="${plugin.@{plugin}.webxml.available}" arg2="true" />
<then>
<xmltask source="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml">
<copy path="/web-app/servlet" buffer="foobar" /> <xmltask source="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml">
</xmltask> <copy path="/web-app/servlet" buffer="foobar" />
<xmltask source="${plugin.dest.dir}/@{plugin}/plugin_temp.xml" dest="${plugin.dest.dir}/@{plugin}/plugin_temp.xml"> </xmltask>
<insert path="//plugin" buffer="foobar" /> <xmltask source="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml" dest="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml">
</xmltask> <insert path="//web-app/servlet[last()]" buffer="foobar" position="after" />
</xmltask>
<xmltask source="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml">
<copy path="/web-app/servlet-mapping" buffer="foobar2" /> <xmltask source="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml">
</xmltask> <copy path="/web-app/servlet-mapping" buffer="foobar2" />
<xmltask source="${plugin.dest.dir}/@{plugin}/plugin_temp.xml" dest="${plugin.dest.dir}/@{plugin}/plugin_temp.xml"> </xmltask>
<insert path="//plugin" buffer="foobar2" /> <xmltask source="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml" dest="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml">
</xmltask> <insert path="//web-app/servlet-mapping[last()]" buffer="foobar2" position="after" />
</xmltask>
<copy tofile="${plugin.dest.dir}/@{plugin}/plugin.xml" file="${plugin.dest.dir}/@{plugin}/plugin_temp.xml"
overwrite="true" /> </then>
<delete file="${plugin.dest.dir}/@{plugin}/plugin_temp.xml" /> </if>
-->
<!-- Compile java classes --> <!-- Compile java classes -->
<javac <javac
...@@ -869,6 +868,7 @@ ...@@ -869,6 +868,7 @@
</fileset> </fileset>
<fileset dir="@{pluginsrc}/@{plugin}/src"> <fileset dir="@{pluginsrc}/@{plugin}/src">
<include name="web/**/*.*" /> <include name="web/**/*.*" />
<exclude name="web/WEB-INF/web.xml" />
<exclude name="web/**/*.jsp" /> <exclude name="web/**/*.jsp" />
<exclude name="web/**/*.jspf" /> <exclude name="web/**/*.jspf" />
<exclude name="web/**/*.html" /> <exclude name="web/**/*.html" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment