Skip to content

Commit

Permalink
Merge pull request #4692 from jGauravGupta/JAKARTA_EE_10.0.0
Browse files Browse the repository at this point in the history
Jakarta EE 10 - Platform/API/RI support
  • Loading branch information
matthiasblaesing committed Jan 17, 2023
2 parents a97c358 + be2b078 commit ad297ed
Show file tree
Hide file tree
Showing 195 changed files with 17,322 additions and 432 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1393,8 +1393,9 @@ fld public final static java.lang.String EE7_DEPLOYER_FRAGMENT = "deployer:gfv4e
fld public final static java.lang.String EE8_DEPLOYER_FRAGMENT = "deployer:gfv5ee8"
fld public final static java.lang.String GLASSFISH_AUTOREGISTERED_INSTANCE = "glassfish_autoregistered_instance"
fld public final static java.lang.String JAKARTAEE8_DEPLOYER_FRAGMENT = "deployer:gfv510ee8"
fld public final static java.lang.String JAKARTAEE91_DEPLOYER_FRAGMENT = "deployer:gfv610ee9"
fld public final static java.lang.String JAKARTAEE9_DEPLOYER_FRAGMENT = "deployer:gfv6ee9"
fld public final static java.lang.String JAKARTAEE91_DEPLOYER_FRAGMENT = "deployer:gfv610ee9"
fld public final static java.lang.String JAKARTAEE10_DEPLOYER_FRAGMENT = "deployer:gfv700ee10"
fld public final static java.lang.String PRELUDE_DEPLOYER_FRAGMENT = "deployer:gfv3"
fld public final static java.util.Set<java.lang.String> activeRegistrationSet
fld public static java.lang.String EE6WC_DEFAULT_NAME
Expand All @@ -1420,7 +1421,7 @@ meth public void addServerInstance(org.netbeans.modules.glassfish.common.Glassfi
meth public void removeChangeListener(javax.swing.event.ChangeListener)
meth public void resultChanged(org.openide.util.LookupEvent)
supr java.lang.Object
hfds AUTOINSTANCECOPIED,EE6WC_INSTANCES_PATH,EE6_INSTANCES_PATH,EE7_INSTANCES_PATH,EE8_INSTANCES_PATH,JAKARTAEE8_INSTANCES_PATH,JAKARTAEE91_INSTANCES_PATH,JAKARTAEE9_INSTANCES_PATH,LOGGER,activeDisplayNames,cf,displayName,glassFishProvider,instanceMap,instancesDirNames,lookupResult,needsJdk6,noPasswordOptions,support,uriFragments
hfds AUTOINSTANCECOPIED,EE6WC_INSTANCES_PATH,EE6_INSTANCES_PATH,EE7_INSTANCES_PATH,EE8_INSTANCES_PATH,JAKARTAEE8_INSTANCES_PATH,JAKARTAEE91_INSTANCES_PATH,JAKARTAEE9_INSTANCES_PATH,JAKARTAEE10_INSTANCES_PATH,LOGGER,activeDisplayNames,cf,displayName,glassFishProvider,instanceMap,instancesDirNames,lookupResult,needsJdk6,noPasswordOptions,support,uriFragments

CLSS public org.netbeans.modules.glassfish.common.Installer
cons public init()
Expand Down Expand Up @@ -1507,6 +1508,7 @@ fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLAS
fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_6_2_3
fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_6_2_4
fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_6_2_5
fld public final static org.netbeans.modules.glassfish.common.ServerDetails GLASSFISH_SERVER_7_0_0
meth public boolean isInstalledInDirectory(java.io.File)
meth public int getVersion()
meth public java.lang.String getDirectUrl()
Expand Down Expand Up @@ -2234,6 +2236,7 @@ meth public static org.netbeans.modules.glassfish.spi.ServerUtilities getEe8Util
meth public static org.netbeans.modules.glassfish.spi.ServerUtilities getJakartaEe8Utilities()
meth public static org.netbeans.modules.glassfish.spi.ServerUtilities getJakartaEe91Utilities()
meth public static org.netbeans.modules.glassfish.spi.ServerUtilities getJakartaEe9Utilities()
meth public static org.netbeans.modules.glassfish.spi.ServerUtilities getJakartaEe10Utilities()
meth public static org.openide.WizardDescriptor$InstantiatingIterator getInstantiatingIterator()
supr java.lang.Object
hfds gip,gwp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ STR_622_SERVER_NAME=GlassFish Server 6.2.2
STR_623_SERVER_NAME=GlassFish Server 6.2.3
STR_624_SERVER_NAME=GlassFish Server 6.2.4
STR_625_SERVER_NAME=GlassFish Server 6.2.5
STR_700_SERVER_NAME=GlassFish Server 7.0.0

# CommonServerSupport.java
MSG_FLAKEY_NETWORK=<html>Network communication problem<br/>Could not establish \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public final class GlassfishInstanceProvider implements ServerInstanceProvider,
public static final String JAKARTAEE8_DEPLOYER_FRAGMENT = "deployer:gfv510ee8";
public static final String JAKARTAEE9_DEPLOYER_FRAGMENT = "deployer:gfv6ee9";
public static final String JAKARTAEE91_DEPLOYER_FRAGMENT = "deployer:gfv610ee9";
public static final String JAKARTAEE10_DEPLOYER_FRAGMENT = "deployer:gfv700ee10";
public static final String EE6WC_DEPLOYER_FRAGMENT = "deployer:gfv3ee6wc"; // NOI18N
public static final String PRELUDE_DEPLOYER_FRAGMENT = "deployer:gfv3"; // NOI18N
private static String EE6_INSTANCES_PATH = "/GlassFishEE6/Instances"; // NOI18N
Expand All @@ -76,6 +77,7 @@ public final class GlassfishInstanceProvider implements ServerInstanceProvider,
private static String JAKARTAEE8_INSTANCES_PATH = "/GlassFishJakartaEE8/Instances"; // NOI18N
private static String JAKARTAEE9_INSTANCES_PATH = "/GlassFishJakartaEE9/Instances"; // NOI18N
private static String JAKARTAEE91_INSTANCES_PATH = "/GlassFishJakartaEE91/Instances"; // NOI18N
private static String JAKARTAEE10_INSTANCES_PATH = "/GlassFishJakartaEE10/Instances"; // NOI18N
private static String EE6WC_INSTANCES_PATH = "/GlassFishEE6WC/Instances"; // NOI18N

public static String PRELUDE_DEFAULT_NAME = "GlassFish_v3_Prelude"; //NOI18N
Expand All @@ -100,11 +102,11 @@ public static GlassfishInstanceProvider getProvider() {
new String[]{EE6_DEPLOYER_FRAGMENT, EE6WC_DEPLOYER_FRAGMENT,
EE7_DEPLOYER_FRAGMENT, EE8_DEPLOYER_FRAGMENT,
JAKARTAEE8_DEPLOYER_FRAGMENT, JAKARTAEE9_DEPLOYER_FRAGMENT,
JAKARTAEE91_DEPLOYER_FRAGMENT},
JAKARTAEE91_DEPLOYER_FRAGMENT, JAKARTAEE10_DEPLOYER_FRAGMENT},
new String[]{EE6_INSTANCES_PATH, EE6WC_INSTANCES_PATH,
EE7_INSTANCES_PATH, EE8_INSTANCES_PATH,
JAKARTAEE8_INSTANCES_PATH, JAKARTAEE9_INSTANCES_PATH,
JAKARTAEE91_INSTANCES_PATH},
JAKARTAEE91_INSTANCES_PATH, JAKARTAEE10_INSTANCES_PATH},
null,
true,
new String[]{"--nopassword"}, // NOI18N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,17 @@ public enum ServerDetails {
"https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/6.2.5/glassfish-6.2.5.zip", // NOI18N
"https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/6.2.5/glassfish-6.2.5.zip", // NOI18N
"http://www.eclipse.org/legal/epl-2.0" //NOI18N
),

/**
* details for an instance of GlassFish Server 7.0.0
*/
GLASSFISH_SERVER_7_0_0(NbBundle.getMessage(ServerDetails.class, "STR_700_SERVER_NAME", new Object[]{}), // NOI18N
"deployer:gfv700ee10", // NOI18N
700,
"https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/7.0.0-M4/glassfish-7.0.0-M4.zip", // NOI18N
"https://repo1.maven.org/maven2/org/glassfish/main/distributions/glassfish/7.0.0-M4/glassfish-7.0.0-M4.zip", // NOI18N
"http://www.eclipse.org/legal/epl-2.0" //NOI18N
);

/**
Expand All @@ -301,6 +312,7 @@ public enum ServerDetails {
public static WizardDescriptor.InstantiatingIterator
getInstantiatingIterator() {
return new ServerWizardIterator(new ServerDetails[]{
GLASSFISH_SERVER_7_0_0,
GLASSFISH_SERVER_6_2_5,
GLASSFISH_SERVER_6_2_4,
GLASSFISH_SERVER_6_2_3,
Expand All @@ -324,6 +336,7 @@ public enum ServerDetails {
GLASSFISH_SERVER_3_0_1,
GLASSFISH_SERVER_3},
new ServerDetails[]{
GLASSFISH_SERVER_7_0_0,
GLASSFISH_SERVER_6_2_5,
GLASSFISH_SERVER_6_2_4,
GLASSFISH_SERVER_6_2_3,
Expand Down Expand Up @@ -382,6 +395,7 @@ public static int getVersionFromInstallDirectory(File glassfishDir) {
case GF_6_2_3: return GLASSFISH_SERVER_6_2_3.getVersion();
case GF_6_2_4: return GLASSFISH_SERVER_6_2_4.getVersion();
case GF_6_2_5: return GLASSFISH_SERVER_6_2_5.getVersion();
case GF_7_0_0: return GLASSFISH_SERVER_7_0_0.getVersion();
default: return -1;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ private static int autoregisterGlassFishInstance(String clusterDirValue, String
String deployer = "deployer:gfv3ee6";
String defaultDisplayNamePrefix = "GlassFish Server ";
GlassFishVersion version = ServerUtils.getServerVersion(glassfishRoot);
if (GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) {
if (GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) {
deployer = "deployer:gfv700ee10";
config = "GlassFishJakartaEE10/Instances";
} else if (GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) {
deployer = "deployer:gfv610ee9";
config = "GlassFishJakartaEE91/Instances";
} else if (GlassFishVersion.ge(version, GlassFishVersion.GF_6)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ STR_623_SERVER_NAME=GlassFish Server 6.2.3
STR_624_SERVER_NAME=GlassFish Server 6.2.4
STR_625_SERVER_NAME=GlassFish Server 6.2.5

STR_V7_FAMILY_NAME=GlassFish Server
STR_7_SERVER_NAME=GlassFish Server 7.0.0

LBL_SELECT_BITS=Select
LBL_ChooseOne=Choose server to download:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ public static GlassfishWizardProvider createJakartaEe91() {
);
}

public static GlassfishWizardProvider createJakartaEe10() {
return new GlassfishWizardProvider(
org.openide.util.NbBundle.getMessage(GlassfishWizardProvider.class,
"STR_V7_FAMILY_NAME", new Object[]{}) // NOI18N
);
}

private final String displayName;

private GlassfishWizardProvider(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ public static ServerUtilities getJakartaEe91Utilities() {
GlassfishWizardProvider.createJakartaEe91());
}

public static ServerUtilities getJakartaEe10Utilities() {
GlassfishInstanceProvider gip = GlassfishInstanceProvider.getProvider();
return null == gip ? null : new ServerUtilities(gip,
GlassfishWizardProvider.createJakartaEe10());
}

// public static ServerUtilities getEe6WCUtilities() {
// GlassfishInstanceProvider gip = GlassfishInstanceProvider.getProvider();
// return null == gip ? null : new ServerUtilities(gip,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,7 @@ fld public final static org.netbeans.modules.glassfish.eecommon.api.config.AppCl
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.AppClientVersion APP_CLIENT_7_0
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.AppClientVersion APP_CLIENT_8_0
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.AppClientVersion APP_CLIENT_9_0
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.AppClientVersion APP_CLIENT_10_0
meth public int compareTo(java.lang.Object)
meth public static org.netbeans.modules.glassfish.eecommon.api.config.AppClientVersion getAppClientVersion(java.lang.String)
supr org.netbeans.modules.glassfish.eecommon.api.config.J2EEBaseVersion
Expand All @@ -888,6 +889,7 @@ fld public final static org.netbeans.modules.glassfish.eecommon.api.config.Appli
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.ApplicationVersion APPLICATION_7_0
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.ApplicationVersion APPLICATION_8_0
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.ApplicationVersion APPLICATION_9_0
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.ApplicationVersion APPLICATION_10_0
meth public int compareTo(java.lang.Object)
meth public static org.netbeans.modules.glassfish.eecommon.api.config.ApplicationVersion getApplicationVersion(java.lang.String)
supr org.netbeans.modules.glassfish.eecommon.api.config.J2EEBaseVersion
Expand Down Expand Up @@ -1195,6 +1197,7 @@ fld public final static org.netbeans.modules.glassfish.eecommon.api.config.J2EEV
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.J2EEVersion JAKARTAEE_8_0
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.J2EEVersion JAKARTAEE_9_0
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.J2EEVersion JAKARTAEE_9_1
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.J2EEVersion JAKARTAEE_10_0
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.J2EEVersion JAVAEE_5_0
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.J2EEVersion JAVAEE_6_0
fld public final static org.netbeans.modules.glassfish.eecommon.api.config.J2EEVersion JAVAEE_7_0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ public final class AppClientVersion extends J2EEBaseVersion {
"9.0", 9000, // NOI18N
"9.0", 9000 // NOI18N
);

/** Represents application-client version 10.0
*/
public static final AppClientVersion APP_CLIENT_10_0 = new AppClientVersion(
"10.0", 10000, // NOI18N
"10.0", 10000 // NOI18N
);
/** -----------------------------------------------------------------------
* Implementation
*/
Expand Down Expand Up @@ -113,6 +120,8 @@ public static AppClientVersion getAppClientVersion(String version) {
result = APP_CLIENT_8_0;
} else if(APP_CLIENT_9_0.toString().equals(version)) {
result = APP_CLIENT_9_0;
} else if(APP_CLIENT_10_0.toString().equals(version)) {
result = APP_CLIENT_10_0;
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ public final class ApplicationVersion extends J2EEBaseVersion {
"9.0", 9000 // NOI18N
);

/** Represents application version 10.0
*/
public static final ApplicationVersion APPLICATION_10_0 = new ApplicationVersion(
"10.0", 10000, // NOI18N
"10.0", 10000 // NOI18N
);

/** -----------------------------------------------------------------------
* Implementation
*/
Expand Down Expand Up @@ -114,6 +121,8 @@ public static ApplicationVersion getApplicationVersion(String version) {
result = APPLICATION_8_0;
} else if(APPLICATION_9_0.toString().equals(version)) {
result = APPLICATION_9_0;
}else if(APPLICATION_10_0.toString().equals(version)) {
result = APPLICATION_10_0;
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ private static int[] versionToResourceFilesIndexes(
if (version == null) {
return new int[]{0,1};
}
// glassfish-resources.xml for v7
if (GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) {
return new int[]{0};
}
// glassfish-resources.xml for v6
if (GlassFishVersion.ge(version, GlassFishVersion.GF_6) || GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) {
return new int[]{0};
Expand Down Expand Up @@ -510,7 +514,8 @@ void internalSetAppServerVersion(ASDDVersion asVersion) {
"gfv5ee8",
"gfv510ee8",
"gfv6ee9",
"gfv610ee9"
"gfv610ee9",
"gfv700ee10"
};

protected ASDDVersion getTargetAppServerVersion() {
Expand Down Expand Up @@ -561,7 +566,13 @@ static ASDDVersion getInstalledAppServerVersionFromDirectory(File asInstallFolde

boolean geGF5 = false;
boolean geGF6 = false;
boolean geGF7 = false;
if(schemaFolder.exists()){
if(new File(schemaFolder, "jakartaee10.xsd").exists() &&
new File(dtdFolder, "glassfish-web-app_3_0-1.dtd").exists()){
geGF7 = true;
return ASDDVersion.GLASSFISH_7;
}
if(new File(schemaFolder, "jakartaee9.xsd").exists() &&
new File(dtdFolder, "glassfish-web-app_3_0-1.dtd").exists()){
geGF6 = true;
Expand All @@ -573,7 +584,7 @@ static ASDDVersion getInstalledAppServerVersionFromDirectory(File asInstallFolde
return ASDDVersion.GLASSFISH_5_1;
}
}
if (!geGF5 && !geGF6 && dtdFolder.exists()) {
if (!geGF5 && !geGF6 && !geGF7 && dtdFolder.exists()) {
if (new File(dtdFolder, "glassfish-web-app_3_0-1.dtd").exists()) {
return ASDDVersion.SUN_APPSERVER_10_1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ public final class J2EEVersion extends J2EEBaseVersion {
public static final J2EEVersion JAKARTAEE_9_1 = new J2EEVersion(
"9.1.0", 91000, // NOI18N
"9.1.0", 91000); // NOI18N

/** Represents Jakarta EE version 10.0.0
*/
public static final J2EEVersion JAKARTAEE_10_0 = new J2EEVersion(
"10.0.0", 100000, // NOI18N
"10.0.0", 100000); // NOI18N

/** -----------------------------------------------------------------------
* Implementation
Expand Down Expand Up @@ -129,6 +135,8 @@ public static J2EEVersion getJ2EEVersion(String version) {
result = JAKARTAEE_9_0;
} else if(JAKARTAEE_9_1.toString().equals(version)) {
result = JAKARTAEE_9_1;
}else if(JAKARTAEE_10_0.toString().equals(version)) {
result = JAKARTAEE_10_0;
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,7 @@ meth public static javax.enterprise.deploy.spi.factories.DeploymentFactory creat
meth public static javax.enterprise.deploy.spi.factories.DeploymentFactory createJakartaEe8()
meth public static javax.enterprise.deploy.spi.factories.DeploymentFactory createJakartaEe9()
meth public static javax.enterprise.deploy.spi.factories.DeploymentFactory createJakartaEe91()
meth public static javax.enterprise.deploy.spi.factories.DeploymentFactory createJakartaEe10()
supr java.lang.Object
hfds displayName,ee6Instance,ee7Instance,ee8Instance,jakartaee8Instance,jakartaee91Instance,jakartaee9Instance,preludeInstance,su,uriFragments,version

Expand Down Expand Up @@ -972,6 +973,7 @@ meth public static org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory crea
meth public static org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory createJakartaEe8()
meth public static org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory createJakartaEe9()
meth public static org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory createJakartaEe91()
meth public static org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory createJakartaEe10()
supr org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory
hfds commonUtilities,df,hasWizard
hcls J2eeInstantiatingIterator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ public ModuleConfiguration create(final @NonNull J2eeModule module,
? instance.getVersion() : null;
try {
Hk2DeploymentManager evaluatedDm = null;
if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) {
if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) {
evaluatedDm = (Hk2DeploymentManager) Hk2DeploymentFactory.createJakartaEe10()
.getDisconnectedDeploymentManager(instanceUrl);
} else if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) {
evaluatedDm = (Hk2DeploymentManager) Hk2DeploymentFactory.createJakartaEe91()
.getDisconnectedDeploymentManager(instanceUrl);
} else if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_6)) {
Expand All @@ -133,6 +136,10 @@ public ModuleConfiguration create(final @NonNull J2eeModule module,
? hk2dm
: evaluatedDm;
if (version != null
&& GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) {
retVal = new ModuleConfigurationImpl(
module, new Hk2Configuration(module, version), dm);
} else if (version != null
&& GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) {
retVal = new ModuleConfigurationImpl(
module, new Hk2Configuration(module, version), dm);
Expand Down
Loading

0 comments on commit ad297ed

Please sign in to comment.