You could have only one DOCTYPE per xml file. Protect the content with a
CDATA section to don't allow the parser analyse the file content.
Try :
<j:file name="${basedir}/resources/application.xml" escapeText="true"
trim="true" prettyPrint="true" outputMode="xml" xmlns="dummy">
<![CDATA[
<your file content/>
]]>
</j:file>
Nicolas,
[EMAIL PROTECTED]
16/10/2003 15:31
Veuillez r�pondre � "Maven Users List"
Pour : Maven Users List <[EMAIL PROTECTED]>
cc :
Objet : j:file and xml files
Hi,
How can I generate XML files with <j:file ... >, notice that I need to add
DTD
declaration in generated files.
<j:file name="${basedir}/resources/application.xml" escapeText="true"
trim="true" prettyPrint="true" outputMode="xml" xmlns="dummy">
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE
Application
1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
<application>
<display-name>${j2ee.displayName}</display-name>
<description>${j2ee.displayName}</description>
<module>
<ejb>${ejb}</ejb>
</module>
<module>
<web>
<web-uri>${uri}</web-uri>
<context-root>${j2ee.contextRoot}</context-root>
</web>
</module>
</application>
</j:file>
Maven crash with :
org.xml.sax.SAXParseException: doctype not allowed in content.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at
org.apache.maven.plugin.PluginCacheManager.parse(PluginCacheManager.java:365)
at
org.apache.maven.plugin.PluginManager.loadJellyScript(PluginManager.java:481)
Thx,
-emmanuel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]