[ 
https://issues.apache.org/jira/browse/NETBEANS-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Laszlo Kishalmi resolved NETBEANS-2130.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 11.0

> Add support to download/install/register GlassFish 5.1
> ------------------------------------------------------
>
>                 Key: NETBEANS-2130
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2130
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: serverplugins - GlassFish
>    Affects Versions: 11.0
>            Reporter: Pete Whelpton
>            Priority: Minor
>              Labels: Glassfish, easy, ee, java, pull-request-available
>             Fix For: 11.0
>
>   Original Estimate: 24h
>          Time Spent: 40m
>  Remaining Estimate: 23h 20m
>
> 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):
> {code:java}
> /** 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);
> {code}
> Add a constant for the string value of GF 5.1 (below GF 5.0 entry)
> {code:java}
> /** 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"};
> {code}
> Add the above values to the Map (below GF 5.0 entry) :
> {code:java}
> initStringValuesMapFromArray(GF_5, GF_5_STR_NEXT);
> initStringValuesMapFromArray(GF_5_1, GF_5_1_STR_NEXT);
> {code}
>  * 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
> {code:java}
> STR_50_SERVER_NAME=GlassFish Server 5.0
> STR_51_SERVER_NAME=GlassFish Server 5.1
> {code}
>  * 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
> {code:java}
> /**
> * 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
> );
> {code}
> 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):
> {code:java}
> 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});
> }
> {code}
> Add GF5.1 version to list of recognised installed GF versions (below GF 5.0):
> {code:java}
> case GF_5:       return GLASSFISH_SERVER_5_0.getVersion();
> case GF_5_1:     return GLASSFISH_SERVER_5_1.getVersion();
> {code}
>  
>  
> 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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to