Bug_581077_Jakarta_EE_10_org_eclipse_jst_jee_enablement
diff --git a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java
index f0709a1..2e2b2c1 100644
--- a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java
+++ b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java
@@ -304,6 +304,10 @@
version = J2EEVersionConstants.JEE_7_0_ID;
} else if (versionAttr.equals(J2EEVersionConstants.VERSION_8_0_TEXT)) {
version = J2EEVersionConstants.JEE_8_0_ID;
+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_9_0_TEXT)) {
+ version = J2EEVersionConstants.JEE_9_0_ID;
+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_10_0_TEXT)) {
+ version = J2EEVersionConstants.JEE_10_0_ID;
}
} else if (isEJBJarFile(fileURI)) {
if (null == versionAttr) {
@@ -340,10 +344,16 @@
version = J2EEVersionConstants.JEE_7_0_ID;
} else if (versionAttr.equals(J2EEVersionConstants.VERSION_8_0_TEXT)) {
version = J2EEVersionConstants.JEE_8_0_ID;
+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_9_0_TEXT)) {
+ version = J2EEVersionConstants.JEE_9_0_ID;
+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_10_0_TEXT)) {
+ version = J2EEVersionConstants.JEE_10_0_ID;
}
} else if (isWARFile(fileURI)) {
if (null == versionAttr) {
version = J2EEVersionConstants.WEB_5_0_ID;
+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) {
+ version = J2EEVersionConstants.WEB_6_0_ID;
} else if (versionAttr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
version = J2EEVersionConstants.WEB_5_0_ID;
} else if (versionAttr.equals(J2EEVersionConstants.VERSION_4_0_TEXT)) {
@@ -370,7 +380,12 @@
version = J2EEVersionConstants.JCA_1_5_ID;
} else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_6_TEXT)) {
version = J2EEVersionConstants.JCA_1_6_ID;
- } else {
+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_7_TEXT)) {
+ version = J2EEVersionConstants.JCA_1_7_ID;
+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_1_TEXT)) {
+ version = J2EEVersionConstants.JCA_2_1_ID;
+ }
+ else {
version = J2EEVersionConstants.JCA_1_5_ID;
}
}
@@ -381,7 +396,11 @@
private static int lookupVersion(String fileURI, String schemaName) {
int version = -1;
if (isEARFile(fileURI)) {
- if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_8)) {
+ if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_10)) {
+ version = J2EEVersionConstants.JEE_10_0_ID;
+ } else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_9)) {
+ version = J2EEVersionConstants.JEE_9_0_ID;
+ } else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_8)) {
version = J2EEVersionConstants.JEE_8_0_ID;
} else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_7)) {
version = J2EEVersionConstants.JEE_7_0_ID;
@@ -405,7 +424,11 @@
version = J2EEVersionConstants.EJB_2_1_ID;
}
} else if (isApplicationClientFile(fileURI)) {
- if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_8)) {
+ if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_10)) {
+ version = J2EEVersionConstants.JEE_10_0_ID;
+ } else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_9)) {
+ version = J2EEVersionConstants.JEE_9_0_ID;
+ } else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_8)) {
version = J2EEVersionConstants.JEE_8_0_ID;
} else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_7)) {
version = J2EEVersionConstants.JEE_7_0_ID;
@@ -417,10 +440,11 @@
version = J2EEVersionConstants.J2EE_1_4_ID;
}
} else if (isWARFile(fileURI)) {
- if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_5_0)) {
+ if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_6_0)) {
+ version = J2EEVersionConstants.WEB_6_0_ID;
+ } else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_5_0)) {
version = J2EEVersionConstants.WEB_5_0_ID;
- }
- else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_4_0)) {
+ } else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_4_0)) {
version = J2EEVersionConstants.WEB_4_0_ID;
} else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_3_1)) {
version = J2EEVersionConstants.WEB_3_1_ID;
@@ -432,7 +456,11 @@
version = J2EEVersionConstants.WEB_2_4_ID;
}
} else if (isRARFile(fileURI)) {
- if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_6)) {
+ if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_2_1)) {
+ version = J2EEVersionConstants.JCA_2_1_ID;
+ } else if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_7)) {
+ version = J2EEVersionConstants.JCA_1_7_ID;
+ } else if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_6)) {
version = J2EEVersionConstants.JCA_1_6_ID;
} else if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_5)) {
version = J2EEVersionConstants.JCA_1_5_ID;
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java
index 9392aca..5a8a496 100644
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java
+++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java
@@ -139,6 +139,7 @@
public String VERSION_6_0_TEXT = "6.0"; //$NON-NLS-1$
public String VERSION_7_0_TEXT = "7.0"; //$NON-NLS-1$
public String VERSION_8_0_TEXT = "8.0"; //$NON-NLS-1$
+ public String VERSION_9_0_TEXT = "9.0"; //$NON-NLS-1$
public String VERSION_10_0_TEXT = "10.0"; //$NON-NLS-1$
public String VERSION_5_TEXT = "5"; //$NON-NLS-1$
public String VERSION_6_TEXT = "6"; //$NON-NLS-1$
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveWrapper.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveWrapper.java
index 662d664..1cd3d57 100644
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveWrapper.java
+++ b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveWrapper.java
@@ -141,7 +141,9 @@
if(jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_5_0_ID ||
jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_6_0_ID ||
jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_7_0_ID ||
- jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_8_0_ID){
+ jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_8_0_ID ||
+ jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_9_0_ID ||
+ jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_10_0_ID ){
try {
Application application = (Application) archive.getModelObject();
List modules = application.getModules();
@@ -184,7 +186,9 @@
if(jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_5_0_ID ||
jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_6_0_ID ||
jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_7_0_ID ||
- jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_8_0_ID){
+ jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_8_0_ID ||
+ jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_9_0_ID ||
+ jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_10_0_ID){
List<IArchiveResource> resources = archive.getArchiveResources();
for (IArchiveResource resource : resources) {
if (resource.getType() != IArchiveResource.DIRECTORY_TYPE) {
@@ -291,7 +295,9 @@
if(earJQP.getJavaEEVersion() == JavaEEQuickPeek.JEE_5_0_ID ||
earJQP.getJavaEEVersion() == JavaEEQuickPeek.JEE_6_0_ID ||
earJQP.getJavaEEVersion() == JavaEEQuickPeek.JEE_7_0_ID ||
- earJQP.getJavaEEVersion() == JavaEEQuickPeek.JEE_8_0_ID){
+ earJQP.getJavaEEVersion() == JavaEEQuickPeek.JEE_8_0_ID ||
+ earJQP.getJavaEEVersion() == JavaEEQuickPeek.JEE_9_0_ID ||
+ earJQP.getJavaEEVersion() == JavaEEQuickPeek.JEE_10_0_ID ){
try {
Application application = (Application) earArchive.getModelObject();
String moduleName = archive.getPath().toString();
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java
index 432f4db..14dd473 100644
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java
+++ b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java
@@ -197,7 +197,11 @@
version = J2EEVersionConstants.JEE_7_0_ID;
} else if (versionStr.equals(J2EEVersionConstants.VERSION_8_0_TEXT)) {
version = J2EEVersionConstants.JEE_8_0_ID;
- }
+ }else if (versionStr.equals(J2EEVersionConstants.VERSION_9_0_TEXT)) {
+ version = J2EEVersionConstants.JEE_9_0_ID;
+ }else if (versionStr.equals(J2EEVersionConstants.VERSION_10_0_TEXT)) {
+ version = J2EEVersionConstants.JEE_10_0_ID;
+ }
break;
case J2EEVersionConstants.CONNECTOR_TYPE:
if (versionStr.equals(J2EEVersionConstants.VERSION_1_0_TEXT)) {
@@ -206,7 +210,11 @@
version = J2EEVersionConstants.JCA_1_5_ID;
} else if (versionStr.equals(J2EEVersionConstants.VERSION_1_6_TEXT)) {
version = J2EEVersionConstants.JCA_1_6_ID;
- }
+ }else if (versionStr.equals(J2EEVersionConstants.VERSION_1_7_TEXT)) {
+ version = J2EEVersionConstants.JCA_1_7_ID;
+ }else if (versionStr.equals(J2EEVersionConstants.VERSION_2_1_TEXT)) {
+ version = J2EEVersionConstants.JCA_2_1_ID;
+ }
break;
case J2EEVersionConstants.EJB_TYPE:
if (versionStr.equals(J2EEVersionConstants.VERSION_1_1_TEXT)) {
@@ -240,7 +248,11 @@
version = J2EEVersionConstants.WEB_3_1_ID;
} else if (versionStr.equals(J2EEVersionConstants.VERSION_4_0_TEXT)) {
version = J2EEVersionConstants.WEB_4_0_ID;
- }
+ } else if (versionStr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
+ version = J2EEVersionConstants.WEB_5_0_ID;
+ } else if (versionStr.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) {
+ version = J2EEVersionConstants.WEB_6_0_ID;
+ }
break;
}
if (version != J2EEVersionConstants.UNKNOWN) {
@@ -411,7 +423,9 @@
if (qp.getVersion() == JavaEEQuickPeek.JEE_5_0_ID ||
qp.getVersion() == JavaEEQuickPeek.JEE_6_0_ID ||
qp.getVersion() == JavaEEQuickPeek.JEE_7_0_ID ||
- qp.getVersion() == JavaEEQuickPeek.JEE_8_0_ID) {
+ qp.getVersion() == JavaEEQuickPeek.JEE_8_0_ID ||
+ qp.getVersion() == JavaEEQuickPeek.JEE_9_0_ID ||
+ qp.getVersion() == JavaEEQuickPeek.JEE_10_0_ID ) {
isNestedWithinEar5OrAbove = true;
org.eclipse.jst.javaee.application.Application app = (org.eclipse.jst.javaee.application.Application) ddObj;
// If lib directory is not specified in deployment descriptor, use the default
diff --git a/plugins/org.eclipse.jst.jee/plugin.xml b/plugins/org.eclipse.jst.jee/plugin.xml
index 8787009..756a010 100644
--- a/plugins/org.eclipse.jst.jee/plugin.xml
+++ b/plugins/org.eclipse.jst.jee/plugin.xml
@@ -325,13 +325,13 @@
</moduleType>
<enablement>
<or>
- <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.appclient:8.0]"/>
- <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.ejb:3.2]"/>
+ <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.appclient:10.0]"/>
+ <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.ejb:4.0]"/>
<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.utility:1.0]"/>
- <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.connector:1.7]"/>
+ <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.connector:2.1]"/>
<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.web:6.0]"/>
<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.ear:[5.0-10.0]"/>
- <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.webfragment:5.0]"/>
+ <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.webfragment:6.0]"/>
</or>
</enablement>
</moduleFactory>