New projects should always have a DTD specified in their template .gwt.xml module file
Also, fix broken NoNag version check logic.
Review at http://gwt-code-reviews.appspot.com/1407803
Review by: jlabanca@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10347 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/tools/WebAppCreator.java b/user/src/com/google/gwt/user/tools/WebAppCreator.java
index c3be99c..962b382 100644
--- a/user/src/com/google/gwt/user/tools/WebAppCreator.java
+++ b/user/src/com/google/gwt/user/tools/WebAppCreator.java
@@ -458,13 +458,22 @@
String gwtValidationPath = installPath + '/' + "validation-api-1.0.0.GA.jar";
String gwtValidationSourcesPath = installPath + '/' + "validation-api-1.0.0.GA-sources.jar";
- // Public builds generate a DTD reference.
- String gwtModuleDtd = "";
+ // Generate a DTD reference.
+ String gwtModuleDtd = "\n<!-- Using DTD from SVN 'trunk'. You probably want to change this"
+ + " to a specific, release tagged, DTD -->"
+ + "\n<!DOCTYPE module PUBLIC \"-//Google Inc.//DTD Google Web Toolkit "
+ + About.getGwtVersionNum()
+ + "//EN\" \"http://google-web-toolkit.googlecode.com/svn/trunk/"
+ + "/distro-source/core/src/gwt-module.dtd\">";
GwtVersion gwtVersion = About.getGwtVersionObject();
- if (gwtVersion.isNoNagVersion()) {
- gwtModuleDtd = "\n<!DOCTYPE module PUBLIC \"-//Google Inc.//DTD Google Web Toolkit "
- + About.getGwtVersionNum()
- + "//EN\" \"http://google-web-toolkit.googlecode.com/svn/tags/"
+ if (!gwtVersion.isNoNagVersion() && !gwtVersion.equals(new GwtVersion(null))) {
+ gwtModuleDtd = "\n<!--"
+ + "\n When updating your version of GWT, you should also update this DTD reference,"
+ + "\n so that your app can take advantage of the latest GWT module capabilities."
+ + "\n-->"
+ + "\n<!DOCTYPE module PUBLIC \"-//Google Inc.//DTD Google Web Toolkit "
+ + About.getGwtVersionNum() + "//EN\""
+ + "\n \"http://google-web-toolkit.googlecode.com/svn/tags/"
+ About.getGwtVersionNum()
+ "/distro-source/core/src/gwt-module.dtd\">";
}