Commit d3f242e7 authored by Guus der Kinderen's avatar Guus der Kinderen

OF-998: Ant should resolve DTDs locally

Ant (or rather, the XMLTask in our build) attempts to lookup DTDs
online. The build (of plugins) will fail if no internet connectivity
is available. This commit references DTDs locally, allowing Ant to
skip the online lookup.
parent c58efa58
......@@ -129,6 +129,23 @@
<fileset dir="${ant.home}/lib" includes="ant.jar" />
</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 -->
<!-- ======================================================================================= -->
......@@ -390,6 +407,7 @@
<for list="${dirlist}" param="plugin" trim="true">
<sequential>
<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">
<![CDATA[
<development>
......@@ -1461,12 +1479,14 @@
<!-- 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 -->
<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-mapping[last()]" buffer="foobar2"/>
</xmltask>
<!-- Add the copied servlet and servlet-mapping elements to the generated 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">
<xmlcatalog refid="dtds"/>
<insert path="/web-app/servlet[last()]" buffer="foobar"
position="after"/>
<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