Skip to content

Commit

Permalink
Merge pull request apache#6747 from pepness/glassfish-7.0.10
Browse files Browse the repository at this point in the history
Add support for GlassFish 7.0.10
- Update maven central repo URL and test every link.
  • Loading branch information
pepness authored Dec 9, 2023
2 parents 76ba9d1 + c2345a6 commit b8f586c
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ STR_706_SERVER_NAME=GlassFish Server 7.0.6
STR_707_SERVER_NAME=GlassFish Server 7.0.7
STR_708_SERVER_NAME=GlassFish Server 7.0.8
STR_709_SERVER_NAME=GlassFish Server 7.0.9
STR_7010_SERVER_NAME=GlassFish Server 7.0.10

# 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 @@ -83,8 +83,8 @@ public enum ServerDetails {
GLASSFISH_SERVER_3_1_2(NbBundle.getMessage(ServerDetails.class, "STR_312_SERVER_NAME", new Object[]{}), // NOI18N
GlassfishInstanceProvider.EE6WC_DEPLOYER_FRAGMENT,
GlassFishVersion.GF_3_1_2,
"https://download.oracle.com/glassfish/3.1.2/release/glassfish-3.1.2-ml.zip", // NOI18N
"https://download.oracle.com/glassfish/3.1.2/release/glassfish-3.1.2-ml.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/3.1.2/glassfish-3.1.2.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/3.1.2/glassfish-3.1.2.zip", // NOI18N
"https://javaee.github.io/glassfish/LICENSE" //NOI18N
),

Expand All @@ -94,8 +94,8 @@ public enum ServerDetails {
GLASSFISH_SERVER_3_1_2_2(NbBundle.getMessage(ServerDetails.class, "STR_3122_SERVER_NAME", new Object[]{}), // NOI18N
GlassfishInstanceProvider.EE6WC_DEPLOYER_FRAGMENT,
GlassFishVersion.GF_3_1_2_2,
"https://download.oracle.com/glassfish/3.1.2.2/release/glassfish-3.1.2.2-ml.zip", // NOI18N
"https://download.oracle.com/glassfish/3.1.2.2/release/glassfish-3.1.2.2-ml.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/3.1.2.2/glassfish-3.1.2.2.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/3.1.2.2/glassfish-3.1.2.2.zip", // NOI18N
"https://javaee.github.io/glassfish/LICENSE" //NOI18N
),

Expand All @@ -105,13 +105,19 @@ public enum ServerDetails {
GLASSFISH_SERVER_4_0(NbBundle.getMessage(ServerDetails.class, "STR_40_SERVER_NAME", new Object[]{}), // NOI18N
GlassfishInstanceProvider.EE7_DEPLOYER_FRAGMENT,
GlassFishVersion.GF_4,
"https://download.oracle.com/glassfish/4.0/release/glassfish-4.0-ml.zip", // NOI18N
"https://download.oracle.com/glassfish/4.0/release/glassfish-4.0-ml.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/4.0/glassfish-4.0.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/4.0/glassfish-4.0.zip", // NOI18N
"https://javaee.github.io/glassfish/LICENSE" //NOI18N
),

/**
* details for an instance of GlassFish Server 4.0.1
/**
* Neither repos have this release:
* <pre>
* -{@code https://download.oracle.com/glassfish}
* -{@code https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/}
*
* Details for an instance of GlassFish Server 4.0.1
* </pre>
*/
GLASSFISH_SERVER_4_0_1(NbBundle.getMessage(ServerDetails.class, "STR_401_SERVER_NAME", new Object[]{}), // NOI18N
GlassfishInstanceProvider.EE7_DEPLOYER_FRAGMENT,
Expand All @@ -127,8 +133,8 @@ public enum ServerDetails {
GLASSFISH_SERVER_4_1(NbBundle.getMessage(ServerDetails.class, "STR_41_SERVER_NAME", new Object[]{}), // NOI18N
GlassfishInstanceProvider.EE7_DEPLOYER_FRAGMENT,
GlassFishVersion.GF_4_1,
"https://download.oracle.com/glassfish/4.1/release/glassfish-4.1.zip", // NOI18N
"https://download.oracle.com/glassfish/4.1/release/glassfish-4.1.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/4.1/glassfish-4.1.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/4.1/glassfish-4.1.zip", // NOI18N
"https://javaee.github.io/glassfish/LICENSE" //NOI18N
),

Expand All @@ -138,8 +144,8 @@ public enum ServerDetails {
GLASSFISH_SERVER_4_1_1(NbBundle.getMessage(ServerDetails.class, "STR_411_SERVER_NAME", new Object[]{}), // NOI18N
GlassfishInstanceProvider.EE7_DEPLOYER_FRAGMENT,
GlassFishVersion.GF_4_1_1,
"https://download.oracle.com/glassfish/4.1.1/release/glassfish-4.1.1.zip", // NOI18N
"https://download.oracle.com/glassfish/4.1.1/release/glassfish-4.1.1.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/4.1.1/glassfish-4.1.1.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/4.1.1/glassfish-4.1.1.zip", // NOI18N
"https://javaee.github.io/glassfish/LICENSE" //NOI18N
),

Expand All @@ -149,8 +155,8 @@ public enum ServerDetails {
GLASSFISH_SERVER_4_1_2(NbBundle.getMessage(ServerDetails.class, "STR_412_SERVER_NAME", new Object[]{}), // NOI18N
GlassfishInstanceProvider.EE7_DEPLOYER_FRAGMENT,
GlassFishVersion.GF_4_1_2,
"https://download.oracle.com/glassfish/4.1.2/release/glassfish-4.1.2.zip", // NOI18N
"https://download.oracle.com/glassfish/4.1.2/release/glassfish-4.1.2.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/4.1.2/glassfish-4.1.2.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/4.1.2/glassfish-4.1.2.zip", // NOI18N
"https://javaee.github.io/glassfish/LICENSE" //NOI18N
),

Expand All @@ -160,8 +166,8 @@ public enum ServerDetails {
GLASSFISH_SERVER_5_0(NbBundle.getMessage(ServerDetails.class, "STR_50_SERVER_NAME", new Object[]{}), // NOI18N
GlassfishInstanceProvider.EE8_DEPLOYER_FRAGMENT,
GlassFishVersion.GF_5,
"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
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/5.0/glassfish-5.0.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/5.0/glassfish-5.0.zip", // NOI18N
"https://javaee.github.io/glassfish/LICENSE" //NOI18N
),

Expand All @@ -171,8 +177,8 @@ public enum ServerDetails {
GLASSFISH_SERVER_5_0_1(NbBundle.getMessage(ServerDetails.class, "STR_501_SERVER_NAME", new Object[]{}), // NOI18N
GlassfishInstanceProvider.EE8_DEPLOYER_FRAGMENT,
GlassFishVersion.GF_5_0_1,
"https://download.oracle.com/glassfish/5.0.1/release/glassfish-5.0.1.zip", // NOI18N
"https://download.oracle.com/glassfish/5.0.1/release/glassfish-5.0.1.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/5.0.1/glassfish-5.0.1.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/5.0.1/glassfish-5.0.1.zip", // NOI18N
"https://javaee.github.io/glassfish/LICENSE" //NOI18N
),

Expand Down Expand Up @@ -383,6 +389,17 @@ public enum ServerDetails {
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.9/glassfish-7.0.9.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.9/glassfish-7.0.9.zip", // NOI18N
"http://www.eclipse.org/legal/epl-2.0" //NOI18N
),

/**
* details for an instance of GlassFish Server 7.0.10
*/
GLASSFISH_SERVER_7_0_10(NbBundle.getMessage(ServerDetails.class, "STR_7010_SERVER_NAME", new Object[]{}), // NOI18N
GlassfishInstanceProvider.JAKARTAEE10_DEPLOYER_FRAGMENT,
GlassFishVersion.GF_7_0_10,
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.10/glassfish-7.0.10.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.10/glassfish-7.0.10.zip", // NOI18N
"http://www.eclipse.org/legal/epl-2.0" //NOI18N
);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,17 @@ 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
STR_700_SERVER_NAME=GlassFish Server 7.0.0
STR_701_SERVER_NAME=GlassFish Server 7.0.1
STR_702_SERVER_NAME=GlassFish Server 7.0.2
STR_703_SERVER_NAME=GlassFish Server 7.0.3
STR_704_SERVER_NAME=GlassFish Server 7.0.4
STR_705_SERVER_NAME=GlassFish Server 7.0.5
STR_706_SERVER_NAME=GlassFish Server 7.0.6
STR_707_SERVER_NAME=GlassFish Server 7.0.7
STR_708_SERVER_NAME=GlassFish Server 7.0.8
STR_709_SERVER_NAME=GlassFish Server 7.0.9
STR_7010_SERVER_NAME=GlassFish Server 7.0.10

LBL_SELECT_BITS=Select
LBL_ChooseOne=Choose server to download:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ public enum GlassFishVersion {
/** GlassFish 7.0.8 */
GF_7_0_8 ((short) 7, (short) 0, (short) 8, (short) 0, GlassFishVersion.GF_7_0_8_STR),
/** GlassFish 7.0.9 */
GF_7_0_9 ((short) 7, (short) 0, (short) 9, (short) 0, GlassFishVersion.GF_7_0_9_STR);
GF_7_0_9 ((short) 7, (short) 0, (short) 9, (short) 0, GlassFishVersion.GF_7_0_9_STR),
/** GlassFish 7.0.10 */
GF_7_0_10 ((short) 7, (short) 0, (short) 10, (short) 0, GlassFishVersion.GF_7_0_10_STR);
////////////////////////////////////////////////////////////////////////////
// Class attributes //
////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -316,6 +318,11 @@ public enum GlassFishVersion {
static final String GF_7_0_9_STR = "7.0.9";
/** Additional {@code String} representations of GF_7_0_9 value. */
static final String GF_7_0_9_STR_NEXT[] = {"7.0.9", "7.0.9.0"};

/** A {@code String} representation of GF_7_0_10 value. */
static final String GF_7_0_10_STR = "7.0.10";
/** Additional {@code String} representations of GF_7_0_10 value. */
static final String GF_7_0_10_STR_NEXT[] = {"7.0.10", "7.0.10.0"};

/**
* Stored <code>String</code> values for backward <code>String</code>
Expand Down Expand Up @@ -363,6 +370,7 @@ public enum GlassFishVersion {
initStringValuesMapFromArray(GF_7_0_7, GF_7_0_7_STR_NEXT);
initStringValuesMapFromArray(GF_7_0_8, GF_7_0_8_STR_NEXT);
initStringValuesMapFromArray(GF_7_0_9, GF_7_0_9_STR_NEXT);
initStringValuesMapFromArray(GF_7_0_10, GF_7_0_10_STR_NEXT);
}

////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ public class ConfigBuilderProvider {
private static final Config.Next CONFIG_V7_0_9
= new Config.Next(GlassFishVersion.GF_7_0_9,
ConfigBuilderProvider.class.getResource("GlassFishV7_0_9.xml"));

/** Library builder configuration since GlassFish 7.0.10. */
private static final Config.Next CONFIG_V7_0_10
= new Config.Next(GlassFishVersion.GF_7_0_10,
ConfigBuilderProvider.class.getResource("GlassFishV7_0_9.xml"));

/** Library builder configuration for GlassFish cloud. */
private static final Config config
Expand All @@ -173,7 +178,7 @@ public class ConfigBuilderProvider {
CONFIG_V7_0_0, CONFIG_V7_0_1, CONFIG_V7_0_2,
CONFIG_V7_0_3, CONFIG_V7_0_4, CONFIG_V7_0_5,
CONFIG_V7_0_6, CONFIG_V7_0_7, CONFIG_V7_0_8,
CONFIG_V7_0_9);
CONFIG_V7_0_9, CONFIG_V7_0_10);

/** Builders array for each server instance. */
private static final ConcurrentMap<GlassFishServer, ConfigBuilder> builders
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ public void testGetInstanceforVersionGF6() {
}

/**
* Test factory functionality for GlassFish v. 7.0.6
* Test factory functionality for GlassFish v. 7.0.10
* <p/>
* Factory should initialize REST {@code Runner} and point it to
* provided {@code Command} instance.
*/
@Test
public void testGetInstanceforVersionGF7() {
GlassFishServerEntity srv = new GlassFishServerEntity();
srv.setVersion(GlassFishVersion.GF_7_0_9);
srv.setVersion(GlassFishVersion.GF_7_0_10);
AdminFactory af = AdminFactory.getInstance(srv.getVersion());
assertTrue(af instanceof AdminFactoryRest);
Command cmd = new CommandVersion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ public void testToValue() {
GlassFishVersion.GF_7_0_8_STR_NEXT);
verifyToValueFromAdditionalArray(GlassFishVersion.GF_7_0_9,
GlassFishVersion.GF_7_0_9_STR_NEXT);
verifyToValueFromAdditionalArray(GlassFishVersion.GF_7_0_10,
GlassFishVersion.GF_7_0_10_STR_NEXT);
}

/**
Expand All @@ -142,7 +144,8 @@ public void testToValueIncomplete() {
GlassFishVersion.GF_7_0_2, GlassFishVersion.GF_7_0_3,
GlassFishVersion.GF_7_0_4, GlassFishVersion.GF_7_0_5,
GlassFishVersion.GF_7_0_6, GlassFishVersion.GF_7_0_7,
GlassFishVersion.GF_7_0_8, GlassFishVersion.GF_7_0_9
GlassFishVersion.GF_7_0_8, GlassFishVersion.GF_7_0_9,
GlassFishVersion.GF_7_0_10
};
String strings[] = {
"1.0.1.4", "2.0.1.5", "2.1.0.3", "2.1.1.7",
Expand All @@ -153,7 +156,8 @@ public void testToValueIncomplete() {
"6.2.0.0", "6.2.1.0", "6.2.2.0", "6.2.3.0",
"6.2.4.0", "6.2.5.0", "7.0.0.0", "7.0.1.0",
"7.0.2.0", "7.0.3.0", "7.0.4.0", "7.0.5.0",
"7.0.6.0", "7.0.7.0", "7.0.8.0", "7.0.9.0"
"7.0.6.0", "7.0.7.0", "7.0.8.0", "7.0.9.0",
"7.0.10.0"
};
for (int i = 0; i < versions.length; i++) {
GlassFishVersion version = GlassFishVersion.toValue(strings[i]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_3;
import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_4;
import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_6_2_5;
import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_7_0_9;
import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_7_0_10;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import org.testng.annotations.Test;
Expand All @@ -47,8 +47,8 @@ public class EnumUtilsTest {
*/
@Test
public void testEq() {
assertFalse(EnumUtils.eq(GF_7_0_9, GF_6_2_5), "Equals for a > b shall be false.");
assertTrue(EnumUtils.eq(GF_7_0_9, GF_7_0_9), "Equals for a == b shall be true.");
assertFalse(EnumUtils.eq(GF_7_0_10, GF_6_2_5), "Equals for a > b shall be false.");
assertTrue(EnumUtils.eq(GF_7_0_10, GF_7_0_10), "Equals for a == b shall be true.");
assertFalse(EnumUtils.eq(GF_4, GF_3), "Equals for a > b shall be false.");
assertTrue(EnumUtils.eq(GF_4, GF_4), "Equals for a == b shall be true.");
assertFalse(EnumUtils.eq(GF_3, GF_4), "Equals for a < b shall be false.");
Expand All @@ -69,8 +69,8 @@ public void testEq() {
*/
@Test
public void testNe() {
assertTrue(EnumUtils.ne(GF_7_0_9, GF_6_2_5), "Not equals for a > b shall be true.");
assertFalse(EnumUtils.ne(GF_7_0_9, GF_7_0_9), "Not equals for a == b shall be false.");
assertTrue(EnumUtils.ne(GF_7_0_10, GF_6_2_5), "Not equals for a > b shall be true.");
assertFalse(EnumUtils.ne(GF_7_0_10, GF_7_0_10), "Not equals for a == b shall be false.");
assertTrue(EnumUtils.ne(GF_4, GF_3), "Not equals for a > b shall be true.");
assertFalse(EnumUtils.ne(GF_4, GF_4), "Not equals for a == b shall be false.");
assertTrue(EnumUtils.ne(GF_3, GF_4), "Not equals for a < b shall be true.");
Expand All @@ -91,8 +91,8 @@ public void testNe() {
*/
@Test
public void testLt() {
assertFalse(EnumUtils.lt(GF_7_0_9, GF_6_2_5), "Less than for a > b shall be false.");
assertFalse(EnumUtils.lt(GF_7_0_9, GF_7_0_9), "Less than for a == b shall be false.");
assertFalse(EnumUtils.lt(GF_7_0_10, GF_6_2_5), "Less than for a > b shall be false.");
assertFalse(EnumUtils.lt(GF_7_0_10, GF_7_0_10), "Less than for a == b shall be false.");
assertFalse(EnumUtils.lt(GF_4, GF_3), "Less than for a > b shall be false.");
assertFalse(EnumUtils.lt(GF_4, GF_4), "Less than for a == b shall be false.");
assertTrue(EnumUtils.lt(GF_3, GF_4), "Less than for a < b shall be true.");
Expand All @@ -113,8 +113,8 @@ public void testLt() {
*/
@Test
public void testLe() {
assertFalse(EnumUtils.le(GF_7_0_9, GF_6_2_5), "Less than or equal for a > b shall be false.");
assertTrue(EnumUtils.le(GF_7_0_9, GF_7_0_9), "Less than or equal for a == b shall be true.");
assertFalse(EnumUtils.le(GF_7_0_10, GF_6_2_5), "Less than or equal for a > b shall be false.");
assertTrue(EnumUtils.le(GF_7_0_10, GF_7_0_10), "Less than or equal for a == b shall be true.");
assertFalse(EnumUtils.le(GF_4, GF_3), "Less than or equal for a > b shall be false.");
assertTrue(EnumUtils.le(GF_4, GF_4), "Less than or equal for a == b shall be true.");
assertTrue(EnumUtils.le(GF_3, GF_4), "Less than or equal for a < b shall be true.");
Expand All @@ -135,8 +135,8 @@ public void testLe() {
*/
@Test
public void testGt() {
assertTrue(EnumUtils.gt(GF_7_0_9, GF_6_2_5), "Greater than for a > b shall be true.");
assertFalse(EnumUtils.gt(GF_7_0_9, GF_7_0_9), "Greater than for a == b shall be false.");
assertTrue(EnumUtils.gt(GF_7_0_10, GF_6_2_5), "Greater than for a > b shall be true.");
assertFalse(EnumUtils.gt(GF_7_0_10, GF_7_0_10), "Greater than for a == b shall be false.");
assertTrue(EnumUtils.gt(GF_4, GF_3), "Greater than for a > b shall be true.");
assertFalse(EnumUtils.gt(GF_4, GF_4), "Greater than for a == b shall be false.");
assertFalse(EnumUtils.gt(GF_3, GF_4), "Greater than for a < b shall be false.");
Expand All @@ -157,8 +157,8 @@ public void testGt() {
*/
@Test
public void testGe() {
assertTrue(EnumUtils.ge(GF_7_0_9, GF_6_2_5), "Greater than or equal for a > b shall be true.");
assertTrue(EnumUtils.ge(GF_7_0_9, GF_7_0_9), "Greater than or equal for a == b shall be true.");
assertTrue(EnumUtils.ge(GF_7_0_10, GF_6_2_5), "Greater than or equal for a > b shall be true.");
assertTrue(EnumUtils.ge(GF_7_0_10, GF_7_0_10), "Greater than or equal for a == b shall be true.");
assertTrue(EnumUtils.ge(GF_4, GF_3), "Greater than or equal for a > b shall be true.");
assertTrue(EnumUtils.ge(GF_4, GF_4), "Greater than or equal for a == b shall be true.");
assertFalse(EnumUtils.ge(GF_3, GF_4), "Greater than or equal for a < b shall be false.");
Expand Down

0 comments on commit b8f586c

Please sign in to comment.