Update of /cvsroot/xdoclet/xdoclet/modules/bea/src/xdoclet/modules/bea/wls/web
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24194/xdoclet/modules/bea/src/xdoclet/modules/bea/wls/web
Modified Files:
WeblogicWebXmlSubTask.java
Log Message:
XDT-1498: added correct dtd reference when generating weblogic.xml
Index: WeblogicWebXmlSubTask.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/bea/src/xdoclet/modules/bea/wls/web/WeblogicWebXmlSubTask.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** WeblogicWebXmlSubTask.java 10 Jun 2003 13:32:41 -0000 1.7
--- WeblogicWebXmlSubTask.java 19 Aug 2005 20:00:58 -0000 1.8
***************
*** 8,11 ****
--- 8,12 ----
import xdoclet.XmlSubTask;
+ import xdoclet.modules.bea.wls.Version;
import xdoclet.util.Translator;
***************
*** 30,38 ****
private final static String GENERATED_FILE_NAME = "weblogic.xml";
! private final static String WEBLOGIC_WEB_PUBLICID = "-//BEA Systems,
Inc.//DTD Web Application 6.0//EN";
! private final static String WEBLOGIC_WEB_SYSTEMID =
"http://www.bea.com/servers/wls600/dtd/weblogic-web-jar.dtd";
! private final static String WEBLOGIC_WEB_DTD_FILE_NAME =
"resources/weblogic-web-jar.dtd";
/**
--- 31,51 ----
private final static String GENERATED_FILE_NAME = "weblogic.xml";
! private final static String WEBLOGIC_WEB_PUBLICID_61 = "-//BEA Systems,
Inc.//DTD Web Application 6.0//EN";
! private final static String WEBLOGIC_WEB_PUBLICID_70 = "-//BEA Systems,
Inc.//DTD Web Application 7.0//EN";
! private final static String WEBLOGIC_WEB_PUBLICID_81 = "-//BEA Systems,
Inc.//DTD Web Application 8.1//EN";
!
! private final static String WEBLOGIC_WEB_SYSTEMID_61 =
"http://www.bea.com/servers/wls600/dtd/weblogic-web-jar.dtd";
!
! private final static String WEBLOGIC_WEB_SYSTEMID_70 =
"http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd";
!
! private final static String WEBLOGIC_WEB_SYSTEMID_81 =
"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd";
!
! private final static String WEBLOGIC_WEB_DTD_FILE_NAME_61 =
"resources/weblogic-web-jar.dtd";
!
! private final static String WEBLOGIC_WEB_DTD_FILE_NAME_70 =
"resources/weblogic700-web-jar.dtd";
!
! private final static String WEBLOGIC_WEB_DTD_FILE_NAME_81 =
"resources/weblogic810-web-jar.dtd";
/**
***************
*** 54,58 ****
* The WLS version.
*/
! private String version = "6.1";
/**
--- 67,71 ----
* The WLS version.
*/
! private String version = Version.VERSION_6_1;
/**
***************
*** 65,71 ****
setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE));
setDestinationFile(GENERATED_FILE_NAME);
- setPublicId(WEBLOGIC_WEB_PUBLICID);
- setSystemId(WEBLOGIC_WEB_SYSTEMID);
- setDtdURL(getClass().getResource(WEBLOGIC_WEB_DTD_FILE_NAME));
setDescription(Translator.getString(XDocletModulesBeaWlsWebMessages.class,
XDocletModulesBeaWlsWebMessages.GENERATED_ATTRIBUTE));
}
--- 78,81 ----
***************
*** 112,122 ****
/**
! * Set the WLS version.
*
! * @param version The new Version value
*/
! public void setVersion(String version)
{
! this.version = version;
}
--- 122,133 ----
/**
! * Sets the target WebLogic version to generate for. Possible values are
6.1, 7.0 and 8.1
*
! * @param version The new Version value
! * @ant.not-required No, default is 6.1
*/
! public void setVersion(Version version)
{
! this.version = version.getValue();
}
***************
*** 151,153 ****
--- 162,192 ----
}
+ /**
+ * @exception XDocletException
+ * @see xdoclet.SubTask#execute()
+ */
+ public void execute() throws XDocletException
+ {
+ setDestinationFile(GENERATED_FILE_NAME);
+
+ if (getVersion().equals(Version.VERSION_6_1) ||
getVersion().equals(Version.VERSION_6_0)) {
+ setPublicId(WEBLOGIC_WEB_PUBLICID_61);
+ setSystemId(WEBLOGIC_WEB_SYSTEMID_61);
+ setDtdURL(getClass().getResource(WEBLOGIC_WEB_DTD_FILE_NAME_61));
+ }
+ else if (getVersion().equals(Version.VERSION_7_0)) {
+ setPublicId(WEBLOGIC_WEB_PUBLICID_70);
+ setSystemId(WEBLOGIC_WEB_SYSTEMID_70);
+ setDtdURL(getClass().getResource(WEBLOGIC_WEB_DTD_FILE_NAME_70));
+ }
+ else {
+ setPublicId(WEBLOGIC_WEB_PUBLICID_81);
+ setSystemId(WEBLOGIC_WEB_SYSTEMID_81);
+ setDtdURL(getClass().getResource(WEBLOGIC_WEB_DTD_FILE_NAME_81));
+ }
+
+ startProcess();
+
+ }
+
}
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
xdoclet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel