com*_*tta 16 java eclipse google-app-engine maven-2 maven
Description Resource Path Location Type
No grammar constraints (DTD or XML schema) detected for the document. TEST-net.kindleit.gae.example.server.MessageRepositoryTest.xml /projecttest-gae-example/target/surefire-reports line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. appengine-web.xml /projecttest-gae-example/src/main/webapp/WEB-INF line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. appengine-web.xml /projecttest-gae-example/target/projecttest-gae-example-1.0-SNAPSHOT/WEB-INF line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. datastore-indexes-auto.xml /projecttest-gae-example/WEB-INF/appengine-generated line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. jdoconfig.xml /projecttest-gae-example/src/main/resources/META-INF line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. jdoconfig.xml /projecttest-gae-example/target/projecttest-gae-example-1.0-SNAPSHOT/WEB-INF/classes/META-INF line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. webapp-cache.xml /projecttest-gae-example/target/war/work line 1 XML Problem
Run Code Online (Sandbox Code Playgroud)
如何解决eclipse上面的问题?我的项目是以maven为基础的.是因为我错过了一些dtd文件吗?如何包含它?
示例jdoconfig.xml
<?xml version="1.0" encoding="utf-8"?>
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
<persistence-manager-factory name="transactions-optional">
<property name="javax.jdo.PersistenceManagerFactoryClass"
value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
<property name="javax.jdo.option.ConnectionURL" value="appengine"/>
<property name="javax.jdo.option.NontransactionalRead" value="true"/>
<property name="javax.jdo.option.NontransactionalWrite" value="true"/>
<property name="javax.jdo.option.RetainValues" value="true"/>
<property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
</persistence-manager-factory>
</jdoconfig>
Run Code Online (Sandbox Code Playgroud)
Von*_*onC 25
初步答复(2009年12月)
如果您有WTP(包含XML部分):
首选项 - >验证 - > XML验证器 - >取消单击手动和/或构建应防止eclipse检查DTD
要么:
从"首选项"页面中,选择"XML">"XML文件".在"验证文件"部分下,您可以在从警告到忽略的下拉列表中更改严重性.请注意,这适用于所有XML文件,而不仅仅是
build.xml.但是,build.xml如果您仍希望对其他XML文件发出此警告,则可以添加到排除过滤器.

更新(2012年2月)
有人在评论(现已删除)中提出了您永远不应忽略警告的有效观点.
但修复它们!
当问到怎么样时,他继续说道(强调我的):
我修复了Eclipse,因为这显然是糟糕设计的标志.
例如,我可能会向Eclipse Foundation错误跟踪器报告错误.
Eclipse需要为"已知"的Spring/Java EE项目文件添加"理智"默认值,以便不需要XML语法.
这个文件出了什么问题,或者Eclipse在某个地方被破坏了.
我遇到的三个问题:
- 使用
Log4j.xml文件,说它找不到XML定义,log4j.dtd尽管该文件位于Validator查找的系统路径中- Ant
build.xml文件说我没有语法限制- 由于某种原因,我无法清理项目.
实际上有些bug讨论围绕这些警告的策略/错误:
显然,关于这些警告的管理需要更多修复.
| 归档时间: |
|
| 查看次数: |
26302 次 |
| 最近记录: |