Having problem with a DTD that does not exist

24 views
Skip to first unread message

Johan Erlands

unread,
Oct 10, 2011, 9:13:05 AM10/10/11
to maven-config-processor-users
Hello all!

I am rebuilding an ear with maven-config-processor and the assembly
plugin. I use the config processor to rewrite the META-INF/
application.xml file. It usually works but today java.sun.com cannot
be reached. This has a fatal effect on the xml-parser, it wines about

The markup declarations contained or pointed to by the document type
declaration must be well-formed.


When I remove this the doctype declaration the processor works.
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
Application 1.2//EN" "http://java.sun.com/j2ee/dtds/
application_1_2.dtd">

I really don't want to depend on internet access for my project to
build. Is there a way to disable the DOCTYPE parsing? I've tried this
parser features but no success:

<parserFeatures>
<parserFeature>
<name>http://apache.org/xml/features/nonvalidating/load-
external-dtd</name>
<value>false</value>
</parserFeature>
<parserFeature>
<name>http://xml.org/sax/features/validation</name>
<value>false</value>
</parserFeature>
<parserFeature>
<name>http://xml.org/sax/features/external-general-
entities</name>
<value>false</value>
</parserFeature>
</parserFeatures>

I am using version 1.8 of the plugin.

Johan Erlands

unread,
Oct 10, 2011, 9:28:32 AM10/10/11
to maven-config-processor-users
Problem solved, I just switched to version 2.0 and set the parser
feature http://apache.org/xml/features/nonvalidating/load-external-dtd
to false.

Leandro de Oliveira

unread,
Oct 10, 2011, 9:33:56 AM10/10/11
to maven-config-p...@googlegroups.com
Hi,

Try to use the latest version of the plugin which is 2.0.

2011/10/10 Johan Erlands <johan....@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "maven-config-processor-users" group.
> To post to this group, send email to maven-config-p...@googlegroups.com.
> To unsubscribe from this group, send email to maven-config-process...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/maven-config-processor-users?hl=en.
>
>

Johan Erlands

unread,
Oct 10, 2011, 9:39:26 AM10/10/11
to maven-config-p...@googlegroups.com
On Monday 10 October 2011 15:33:56 Leandro de Oliveira wrote:
> Try to use the latest version of the plugin which is 2.0.

That works like a charm :)

Reply all
Reply to author
Forward
0 new messages