Commit 5fd38241 authored by Dave Cridland's avatar Dave Cridland

Merge pull request #485 from guusdk/OF-998

OF-998: Ant should resolve DTDs locally
parents 20eb8c48 d3f242e7
...@@ -129,6 +129,23 @@ ...@@ -129,6 +129,23 @@
<fileset dir="${ant.home}/lib" includes="ant.jar" /> <fileset dir="${ant.home}/lib" includes="ant.jar" />
</path> </path>
<!-- Reference DTDs and XSDs on the classpath, to prevent them from being looked up online. -->
<xmlcatalog id="dtds">
<!-- Provided on the classpath (by Jetty/Jasper) -->
<entity publicId="http://java.sun.com/xml/ns/j2ee" location="javax/servlet/jsp/resources/jsp_2_0.xsd"/>
<entity publicId="http://java.sun.com/xml/ns/javaee" location="javax/servlet/jsp/resources/jsp_2_1.xsd"/>
<entity publicId="http://java.sun.com/xml/ns/javaee" location="javax/servlet/jsp/resources/jsp_2_2.xsd"/>
<entity publicId="http://xmlns.jcp.org/xml/ns/javaee" location="javax/servlet/jsp/resources/jsp_2_3.xsd"/>
<entity publicId="http://java.sun.com/JSP/Page" location="javax/servlet/jsp/resources/jspxml_2_0.xsd"/>
<entity publicId="http://java.sun.com/xml/ns/j2ee" location="javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd"/>
<entity publicId="http://java.sun.com/xml/ns/javaee" location="javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd"/>
<dtd publicId="http://java.sun.com/JSP/Page" location="javax/servlet/jsp/resources/jspxml_2_0.dtd"/>
<dtd publicId="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" location="javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd"/>
<!-- Provided in the lib folder -->
<dtd publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" location="${lib.ant.dir}/web-app_2_3.dtd"/>
</xmlcatalog>
<!-- ======================================================================================= --> <!-- ======================================================================================= -->
<!-- GLOBAL TASKDEFs --> <!-- GLOBAL TASKDEFs -->
<!-- ======================================================================================= --> <!-- ======================================================================================= -->
...@@ -390,6 +407,7 @@ ...@@ -390,6 +407,7 @@
<for list="${dirlist}" param="plugin" trim="true"> <for list="${dirlist}" param="plugin" trim="true">
<sequential> <sequential>
<xmltask source="${plugin.src.dir}/@{plugin}/plugin.xml" dest="${plugin.src.dir}/@{plugin}/plugins2.xml"> <xmltask source="${plugin.src.dir}/@{plugin}/plugin.xml" dest="${plugin.src.dir}/@{plugin}/plugins2.xml">
<xmlcatalog refid="dtds"/>
<insert path="/plugin/minOpenfireVersion[last()]" position="after"> <insert path="/plugin/minOpenfireVersion[last()]" position="after">
<![CDATA[ <![CDATA[
<development> <development>
...@@ -1461,12 +1479,14 @@ ...@@ -1461,12 +1479,14 @@
<!-- Copy the servlet and servlet-mapping elements from the original web.xml to a temp buffer. <!-- Copy the servlet and servlet-mapping elements from the original web.xml to a temp buffer.
Note: The original web.xml can only contain one servlet and servlet-mapping --> Note: The original web.xml can only contain one servlet and servlet-mapping -->
<xmltask source="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml"> <xmltask source="@{pluginsrc}/@{plugin}/src/web/WEB-INF/web.xml">
<xmlcatalog refid="dtds"/>
<copy path="//web-app/servlet[last()]" buffer="foobar"/> <copy path="//web-app/servlet[last()]" buffer="foobar"/>
<copy path="//web-app/servlet-mapping[last()]" buffer="foobar2"/> <copy path="//web-app/servlet-mapping[last()]" buffer="foobar2"/>
</xmltask> </xmltask>
<!-- Add the copied servlet and servlet-mapping elements to the generated web.xml --> <!-- Add the copied servlet and servlet-mapping elements to the generated web.xml -->
<xmltask source="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml" <xmltask source="${plugin.dev.dest.dir}/@{plugin}/target/jspc/web.xml"
dest="${plugin.dev.dest.dir}/@{plugin}/target/web/WEB-INF/web.xml"> dest="${plugin.dev.dest.dir}/@{plugin}/target/web/WEB-INF/web.xml">
<xmlcatalog refid="dtds"/>
<insert path="/web-app/servlet[last()]" buffer="foobar" <insert path="/web-app/servlet[last()]" buffer="foobar"
position="after"/> position="after"/>
<insert path="/web-app/servlet-mapping[last()]" buffer="foobar2" <insert path="/web-app/servlet-mapping[last()]" buffer="foobar2"
......
This diff is collapsed.
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