Commit c21ee1d0 authored by Bill Lynch's avatar Bill Lynch Committed by bill

Possible fix for building plugins that have no jsp's but do have a web.xml.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1262 b35dd754-fafc-0310-a699-88a17e54d16e
parent 6d34c564
...@@ -386,7 +386,7 @@ ...@@ -386,7 +386,7 @@
<!-- Update the web.xml to include the servlet and servlet mapping defs from jspc --> <!-- Update the web.xml to include the servlet and servlet mapping defs from jspc -->
<loadfile property="servlet-xml" srcFile="${jspc.dest.dir}/web.partial.xml" /> <loadfile property="servlet-xml" srcFile="${jspc.dest.dir}/web.partial.xml" />
<copy file="${web.dir}/WEB-INF/web.xml" <copy file="${web.dir}/WEB-INF/web.xml"
toFile="${webapp.dest.dir}/WEB-INF/web.xml" toFile="${webapp.dest.dir}/WEB-INF/web-new.xml"
overwrite="true"> overwrite="true">
<filterset begintoken="&lt;!--@@" endtoken="@@--&gt;"> <filterset begintoken="&lt;!--@@" endtoken="@@--&gt;">
<filter token="JSPC-SERVLETS" value="${servlet-xml}" /> <filter token="JSPC-SERVLETS" value="${servlet-xml}" />
...@@ -772,6 +772,9 @@ ...@@ -772,6 +772,9 @@
<attribute name="plugin" /> <attribute name="plugin" />
<attribute name="pluginsrc" /> <attribute name="pluginsrc" />
<sequential> <sequential>
<echo message="\n\nBuilding @{plugin}...\n\n" />
<!-- For each plugin, copile code, make a jar and copy resources. --> <!-- For each plugin, copile code, make a jar and copy resources. -->
<mkdir dir="${plugin.dev.dest.dir}" /> <mkdir dir="${plugin.dev.dest.dir}" />
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}" /> <mkdir dir="${plugin.dev.dest.dir}/@{plugin}" />
...@@ -874,30 +877,31 @@ ...@@ -874,30 +877,31 @@
<available property="plugin.@{plugin}.webxml.available" <available property="plugin.@{plugin}.webxml.available"
type="file" file="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml" /> type="file" file="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml" />
<echo> <mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target/web/WEB-INF" />
plugin: @{plugin}
plugin.@{plugin}.webxml.available: ${plugin.@{plugin}.webxml.available}
</echo>
<if> <if>
<equals arg1="${plugin.@{plugin}.webxml.available}" arg2="true" /> <equals arg1="${plugin.@{plugin}.webxml.available}" arg2="true" />
<then> <then>
<xmltask source="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml"> <xmltask source="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml">
<copy path="/web-app/servlet" buffer="foobar" /> <copy path="//web-app/servlet[last()]" buffer="foobar" />
</xmltask> </xmltask>
<xmltask source="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml" dest="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml"> <xmltask source="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml" dest="${plugin.dev.dest.dir}/@{plugin}/target/web/WEB-INF/web.xml">
<insert path="//web-app/servlet[last()]" buffer="foobar" position="after" /> <insert path="/web-app/servlet" buffer="foobar" position="after" />
</xmltask> </xmltask>
<xmltask source="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml"> <xmltask source="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml">
<copy path="/web-app/servlet-mapping" buffer="foobar2" /> <copy path="//web-app/servlet-mapping[last()]" buffer="foobar2" />
</xmltask> </xmltask>
<xmltask source="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml" dest="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml"> <xmltask source="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml" dest="${plugin.dev.dest.dir}/@{plugin}/target/web/WEB-INF/web.xml">
<insert path="//web-app/servlet-mapping[last()]" buffer="foobar2" position="after" /> <insert path="/web-app/servlet-mapping" buffer="foobar2" position="after" />
</xmltask> </xmltask>
</then> </then>
<else>
<copy todir="${plugin.dev.dest.dir}/@{plugin}/target/web/WEB-INF"
file="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml" />
</else>
</if> </if>
<!-- Compile java classes --> <!-- Compile java classes -->
...@@ -929,6 +933,7 @@ ...@@ -929,6 +933,7 @@
<copy todir="${plugin.dev.dest.dir}/@{plugin}/jar"> <copy todir="${plugin.dev.dest.dir}/@{plugin}/jar">
<fileset dir="${plugin.dev.dest.dir}/@{plugin}/target"> <fileset dir="${plugin.dev.dest.dir}/@{plugin}/target">
<include name="lib/*.jar" /> <include name="lib/*.jar" />
<include name="web/WEB-INF/web.xml" />
</fileset> </fileset>
<fileset dir="@{pluginsrc}/@{plugin}/src"> <fileset dir="@{pluginsrc}/@{plugin}/src">
<include name="web/**/*.*" /> <include name="web/**/*.*" />
...@@ -939,11 +944,11 @@ ...@@ -939,11 +944,11 @@
<exclude name="java/**/*.java" /> <exclude name="java/**/*.java" />
</fileset> </fileset>
</copy> </copy>
<copy todir="${plugin.dev.dest.dir}/@{plugin}/jar/web" failonerror="false"> <!-- <copy todir="${plugin.dev.dest.dir}/@{plugin}/jar/web" failonerror="false">-->
<fileset dir="${plugin.dev.dest.dir}/@{plugin}/target/jspc"> <!-- <fileset dir="${plugin.dev.dest.dir}/@{plugin}/target/jspc">-->
<include name="web.xml" /> <!-- <include name="web.xml" />-->
</fileset> <!-- </fileset>-->
</copy> <!-- </copy>-->
<!-- Jar the plugin --> <!-- Jar the plugin -->
<jar jarfile="${plugin.dest.dir}/@{plugin}.jar"> <jar jarfile="${plugin.dest.dir}/@{plugin}.jar">
......
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