Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
11.0
Description
Eclipse Foundation have released GlassFish 5.1. Netbeans should add support to download, install and register, as per previous versions of GlassFish.
Based on my work on GF 4.1.2 & GF 5.0, the steps need should be something like:
- Update Glassfish Tooling module so that NB will recognise GF 5.1 as a distinct version (rather than reporting an instance of GF 5.1 as GF 5.0)
Modify enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java
Add value for GF 5.1 to bottom of Enum values (below GF5.0 entry):
/** GlassFish 5. */ GF_5 ((short) 5, (short) 0, (short) 0, (short) 0, GlassFishVersion.GF_5_STR); /** GlassFish 5.1 */ GF_5_1 ((short) 5, (short) 1, (short) 0, (short) 0, GlassFishVersion.GF_5_1_STR);
Add a constant for the string value of GF 5.1 (below GF 5.0 entry)
/** A <code>String</code> representation of GF_5 value. */ static final String GF_5_STR = "5"; /** Additional <code>String</code> representations of GF_5 value. */ static final String GF_5_STR_NEXT[] = {"5.0", "5.0.0", "5.0.0.0"}; /** A <code>String</code> representation of GF_5_1 value. */ static final String GF_5_1_STR = "5.1"; /** Additional <code>String</code> representations of GF_5_1 value. */ static final String GF_5_1_STR_NEXT[] = {"5.1.0", "5.1.0.0"};
Add the above values to the Map (below GF 5.0 entry) :
initStringValuesMapFromArray(GF_5, GF_5_STR_NEXT); initStringValuesMapFromArray(GF_5_1, GF_5_1_STR_NEXT);
- Update Glassfish Common module. Add new string value to Bundle
Modify enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties to add a string value for GF 5.1 below GF 5.0
STR_50_SERVER_NAME=GlassFish Server 5.0 STR_51_SERVER_NAME=GlassFish Server 5.1
- Update Server Details so NB knows where to download GF 5.1 from
Modify enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java and add an entry for GF5.1 below GF5.0
/** * details for an instance of GlassFish Server 5 */ GLASSFISH_SERVER_5_0(NbBundle.getMessage(ServerDetails.class, "STR_50_SERVER_NAME", new Object[]{}), // NOI18N "deployer:gfv3ee6wc", // NOI18N 500, "https://download.oracle.com/glassfish/5.0/release/glassfish-5.0.zip", // NOI18N "https://download.oracle.com/glassfish/5.0/release/glassfish-5.0.zip" // NOI18N ); /** * details for an instance of GlassFish Server 5.1 */ GLASSFISH_SERVER_5_1(NbBundle.getMessage(ServerDetails.class, "STR_51_SERVER_NAME", new Object[]{}), // NOI18N "deployer:gfv3ee6wc", // NOI18N 510, "https://www.eclipse.org/downloads/download.php?file=/glassfish/glassfish-5.1.0.zip&mirror_id=492", // NOI18N "https://www.eclipse.org/downloads/download.php?file=/glassfish/glassfish-5.1.0.zip&mirror_id=492" // NOI18N );
Add GF 5.1 to the top of the Server Details iterator (the "top half" should be all supported GF versions, the bottom half is those that can be installed via NB UI - OPTIONALLY remove GF 3.1.2.2 from the bottom half):
return new ServerWizardIterator(new ServerDetails[]{ GLASSFISH_SERVER_5_1, GLASSFISH_SERVER_5_0, GLASSFISH_SERVER_4_1_2, GLASSFISH_SERVER_4_1_1, GLASSFISH_SERVER_4_1, GLASSFISH_SERVER_4_0_1, GLASSFISH_SERVER_4_0, GLASSFISH_SERVER_3_1_2_2, GLASSFISH_SERVER_3_1_2, GLASSFISH_SERVER_3_1_1, GLASSFISH_SERVER_3_1, GLASSFISH_SERVER_3_0_1, GLASSFISH_SERVER_3,}, new ServerDetails[]{ GLASSFISH_SERVER_5_1, GLASSFISH_SERVER_5_0, GLASSFISH_SERVER_4_1_2, GLASSFISH_SERVER_4_1_1, GLASSFISH_SERVER_4_1, GLASSFISH_SERVER_4_0, GLASSFISH_SERVER_3_1_2_2}); }
Add GF5.1 version to list of recognised installed GF versions (below GF 5.0):
case GF_5: return GLASSFISH_SERVER_5_0.getVersion(); case GF_5_1: return GLASSFISH_SERVER_5_1.getVersion();
The other thing that would need doing would be pointing to the Ecilpse Licence, rather than the Oracle one. I was thinking of something like:
- Adding the licence location for each GF version to the enum in ServerDetails
- Moving the checkbox and link to the licence to the dialog box where the user chooses the glassfish version
- Updating the licence link based on which version of GF is selected in the dropdown by querying the ServerDetails
Attachments
Issue Links
- links to