Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 230362 Details for
Bug 405873
"Generate Deployment Descriptor Stub" generates incorrect web.xml for web 3.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Update the Java EE model providers
bug405873javaee2.patch (text/plain), 6.37 KB, created by
Carl Anderson
on 2013-05-01 16:13:25 EDT
(
hide
)
Description:
Update the Java EE model providers
Filename:
MIME Type:
Creator:
Carl Anderson
Created:
2013-05-01 16:13:25 EDT
Size:
6.37 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.j2ee.core >diff --git mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java >index ccabece..0a39de0 100644 >--- mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java >+++ mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java >@@ -207,6 +207,7 @@ > > String J2EE_NS_URL = "http://java.sun.com/xml/ns/j2ee"; //$NON-NLS-1$ > String JAVAEE_NS_URL = "http://java.sun.com/xml/ns/javaee"; //$NON-NLS-1$ //EJB3 >+ String JAVAEE7_NS_URL = "http://xmlns.jcp.org/xml/ns/javaee"; //$NON-NLS-1$ > String J2EE_1_4_XSD_SHORT_NAME = "j2ee_1_4.xsd"; //$NON-NLS-1$ > String JAVAEE_5_XSD_SHORT_NAME = "javaee_5.xsd"; //$NON-NLS-1$ //EJB3 > String XSI_NS_URL = "http://www.w3.org/2001/XMLSchema-instance"; //$NON-NLS-1$ >#P org.eclipse.jst.jee.web >diff --git web/org/eclipse/jst/jee/model/internal/Web25ModelProvider.java web/org/eclipse/jst/jee/model/internal/Web25ModelProvider.java >index e0cf417..751d02a 100644 >--- web/org/eclipse/jst/jee/model/internal/Web25ModelProvider.java >+++ web/org/eclipse/jst/jee/model/internal/Web25ModelProvider.java >@@ -66,10 +66,16 @@ > dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.WEB_APP_SCHEMA_LOC_2_5); > war.setVersion(WebAppVersionType._25_LITERAL); > } >- else >- { >+ else if(version != null && version.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) { > dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.WEB_APP_SCHEMA_LOC_3_0); > war.setVersion(WebAppVersionType._30_LITERAL); >+ } >+ else >+ { >+ dd.getXMLNSPrefixMap().put("", J2EEConstants.JAVAEE7_NS_URL); //$NON-NLS-1$ >+ dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE7_NS_URL, J2EEConstants.WEB_APP_SCHEMA_LOC_3_1); >+ // note that later EMF generations remove the _LITERAL from the enum >+ war.setVersion(WebAppVersionType._31); > } > dd.setWebApp(war); > res.getContents().add((EObject) dd); >diff --git web/org/eclipse/jst/jee/model/internal/WebFragment30ModelProvider.java web/org/eclipse/jst/jee/model/internal/WebFragment30ModelProvider.java >index c97570b..5e9f4d0 100644 >--- web/org/eclipse/jst/jee/model/internal/WebFragment30ModelProvider.java >+++ web/org/eclipse/jst/jee/model/internal/WebFragment30ModelProvider.java >@@ -66,7 +66,14 @@ > if(version != null && version.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) { > dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.WEBFRAGMENT_SCHEMA_LOC_3_0); > webFragment.setVersion(WebAppVersionType._30_LITERAL); >- } >+ } >+ else >+ { >+ dd.getXMLNSPrefixMap().put("", J2EEConstants.JAVAEE7_NS_URL); //$NON-NLS-1$ >+ dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE7_NS_URL, J2EEConstants.WEBFRAGMENT_SCHEMA_LOC_3_1); >+ // note that later EMF generations remove the _LITERAL from the enum >+ webFragment.setVersion(WebAppVersionType._31); >+ } > dd.setWebFragment(webFragment); > res.getContents().add((EObject) dd); > } >#P org.eclipse.jst.jee >diff --git jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProvider.java jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProvider.java >index 135cb45..4974ad3 100644 >--- jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProvider.java >+++ jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProvider.java >@@ -64,10 +64,15 @@ > dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.APP_CLIENT_SCHEMA_LOC_5); > client.setVersion(J2EEVersionConstants.VERSION_5_TEXT); > } >- else { >+ else if(version != null && version.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) { > dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.APP_CLIENT_SCHEMA_LOC_6); > client.setVersion(J2EEVersionConstants.VERSION_6_TEXT); > } >+ else { >+ dd.getXMLNSPrefixMap().put("", J2EEConstants.JAVAEE7_NS_URL); //$NON-NLS-1$ >+ dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE7_NS_URL, J2EEConstants.APP_CLIENT_SCHEMA_LOC_7); >+ client.setVersion(J2EEVersionConstants.VERSION_7_TEXT); >+ } > > dd.setApplicationClient(client); > res.getContents().add((EObject) dd); >diff --git jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProvider.java jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProvider.java >index 2546b4d..5dfd42f 100644 >--- jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProvider.java >+++ jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProvider.java >@@ -65,11 +65,12 @@ > dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.CONNECTOR_SCHEMA_LOC_1_6); > connector.setVersion(J2EEVersionConstants.VERSION_1_6_TEXT); > } >- else >+ else > { >- // default to 1.6 for now >- dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.CONNECTOR_SCHEMA_LOC_1_6); >- connector.setVersion(J2EEVersionConstants.VERSION_1_6_TEXT); >+ // default to 1.7 for now >+ dd.getXMLNSPrefixMap().put("", J2EEConstants.JAVAEE7_NS_URL); //$NON-NLS-1$ >+ dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE7_NS_URL, J2EEConstants.CONNECTOR_SCHEMA_LOC_1_7); >+ connector.setVersion(J2EEVersionConstants.VERSION_1_7_TEXT); > } > dd.setConnector(connector); > res.getContents().add((EObject) dd); >diff --git jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProvider.java jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProvider.java >index 46f938b..7272aa4 100644 >--- jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProvider.java >+++ jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProvider.java >@@ -102,9 +102,13 @@ > dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.APPLICATION_SCHEMA_LOC_5); > ear.setVersion(J2EEVersionConstants.VERSION_5_TEXT); > } >- else { >+ else if(version != null && version.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) { > dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.APPLICATION_SCHEMA_LOC_6); >- ear.setVersion(J2EEVersionConstants.VERSION_6_TEXT); >+ ear.setVersion(J2EEVersionConstants.VERSION_6_TEXT); >+ } else { >+ dd.getXMLNSPrefixMap().put("", J2EEConstants.JAVAEE7_NS_URL); //$NON-NLS-1$ >+ dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE7_NS_URL, J2EEConstants.APPLICATION_SCHEMA_LOC_7); >+ ear.setVersion(J2EEVersionConstants.VERSION_7_TEXT); > } > > dd.setApplication(ear);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 405873
:
230350
|
230351
| 230362