Skip to content

Commit

Permalink
Add support for GlassFish 7.0.14 and GlassFish 8.0.0-M4
Browse files Browse the repository at this point in the history
  • Loading branch information
pepness committed Apr 10, 2024
1 parent dcd15da commit 652a36f
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ STR_7010_SERVER_NAME=GlassFish Server 7.0.10
STR_7011_SERVER_NAME=GlassFish Server 7.0.11
STR_7012_SERVER_NAME=GlassFish Server 7.0.12
STR_7013_SERVER_NAME=GlassFish Server 7.0.13
STR_7014_SERVER_NAME=GlassFish Server 7.0.14
STR_800_SERVER_NAME=GlassFish Server 8.0.0

# CommonServerSupport.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,25 @@ public enum ServerDetails {
"http://www.eclipse.org/legal/epl-2.0" //NOI18N
),

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

/**
* details for an instance of GlassFish Server 8.0.0
*/
GLASSFISH_SERVER_8_0_0(NbBundle.getMessage(ServerDetails.class, "STR_800_SERVER_NAME", new Object[]{}), // NOI18N
GlassfishInstanceProvider.JAKARTAEE11_DEPLOYER_FRAGMENT,
GlassFishVersion.GF_8_0_0,
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/8.0.0-M3/glassfish-8.0.0-M3.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/8.0.0-M3/glassfish-8.0.0-M3.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/8.0.0-M4/glassfish-8.0.0-M4.zip", // NOI18N
"https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/8.0.0-M4/glassfish-8.0.0-M4.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 @@ -181,6 +181,7 @@ STR_7010_SERVER_NAME=GlassFish Server 7.0.10
STR_7011_SERVER_NAME=GlassFish Server 7.0.11
STR_7012_SERVER_NAME=GlassFish Server 7.0.12
STR_7013_SERVER_NAME=GlassFish Server 7.0.13
STR_7014_SERVER_NAME=GlassFish Server 7.0.14

STR_V8_FAMILY_NAME=GlassFish Server
STR_800_SERVER_NAME=GlassFish Server 8.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ public enum GlassFishVersion {
GF_7_0_12 ((short) 7, (short) 0, (short) 12, (short) 0, GlassFishVersion.GF_7_0_12_STR),
/** GlassFish 7.0.13 */
GF_7_0_13 ((short) 7, (short) 0, (short) 13, (short) 0, GlassFishVersion.GF_7_0_13_STR),
/** GlassFish 7.0.14 */
GF_7_0_14 ((short) 7, (short) 0, (short) 14, (short) 0, GlassFishVersion.GF_7_0_14_STR),
/** GlassFish 8.0.0 */
GF_8_0_0 ((short) 8, (short) 0, (short) 0, (short) 0, GlassFishVersion.GF_8_0_0_STR);
////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -347,6 +349,11 @@ public enum GlassFishVersion {
/** Additional {@code String} representations of GF_7_0_13 value. */
static final String GF_7_0_13_STR_NEXT[] = {"7.0.13", "7.0.13.0"};

/** A {@code String} representation of GF_7_0_14 value. */
static final String GF_7_0_14_STR = "7.0.14";
/** Additional {@code String} representations of GF_7_0_14 value. */
static final String GF_7_0_14_STR_NEXT[] = {"7.0.14", "7.0.14.0"};

/** A {@code String} representation of GF_8_0_0 value. */
static final String GF_8_0_0_STR = "8.0.0";
/** Additional {@code String} representations of GF_8_0_0 value. */
Expand Down Expand Up @@ -402,6 +409,7 @@ public enum GlassFishVersion {
initStringValuesMapFromArray(GF_7_0_11, GF_7_0_11_STR_NEXT);
initStringValuesMapFromArray(GF_7_0_12, GF_7_0_12_STR_NEXT);
initStringValuesMapFromArray(GF_7_0_13, GF_7_0_13_STR_NEXT);
initStringValuesMapFromArray(GF_7_0_14, GF_7_0_14_STR_NEXT);
initStringValuesMapFromArray(GF_8_0_0, GF_8_0_0_STR_NEXT);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ public class ConfigBuilderProvider {
= new Config.Next(GlassFishVersion.GF_7_0_13,
ConfigBuilderProvider.class.getResource("GlassFishV7_0_9.xml"));

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

/** Library builder configuration since GlassFish 8.0.0. */
private static final Config.Next CONFIG_V8_0_0
= new Config.Next(GlassFishVersion.GF_8_0_0,
Expand All @@ -199,7 +204,8 @@ public class ConfigBuilderProvider {
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_10, CONFIG_V7_0_11,
CONFIG_V7_0_12, CONFIG_V7_0_13, CONFIG_V8_0_0);
CONFIG_V7_0_12, CONFIG_V7_0_13, CONFIG_V7_0_14,
CONFIG_V8_0_0);

/** 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.13
* Test factory functionality for GlassFish v. 7.0.14
* <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_13);
srv.setVersion(GlassFishVersion.GF_7_0_14);
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 @@ -125,6 +125,8 @@ public void testToValue() {
GlassFishVersion.GF_7_0_12_STR_NEXT);
verifyToValueFromAdditionalArray(GlassFishVersion.GF_7_0_13,
GlassFishVersion.GF_7_0_13_STR_NEXT);
verifyToValueFromAdditionalArray(GlassFishVersion.GF_7_0_14,
GlassFishVersion.GF_7_0_14_STR_NEXT);
verifyToValueFromAdditionalArray(GlassFishVersion.GF_8_0_0,
GlassFishVersion.GF_8_0_0_STR_NEXT);
}
Expand Down Expand Up @@ -155,7 +157,7 @@ public void testToValueIncomplete() {
GlassFishVersion.GF_7_0_8, GlassFishVersion.GF_7_0_9,
GlassFishVersion.GF_7_0_10, GlassFishVersion.GF_7_0_11,
GlassFishVersion.GF_7_0_12, GlassFishVersion.GF_7_0_13,
GlassFishVersion.GF_8_0_0
GlassFishVersion.GF_7_0_14, GlassFishVersion.GF_8_0_0
};
String strings[] = {
"1.0.1.4", "2.0.1.5", "2.1.0.3", "2.1.1.7",
Expand All @@ -168,7 +170,7 @@ public void testToValueIncomplete() {
"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.10.0", "7.0.11.0", "7.0.12.0", "7.0.13.0",
"8.0.0.0"
"7.0.14.0", "8.0.0.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_13;
import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_7_0_14;
import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_8_0_0;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
Expand All @@ -48,10 +48,10 @@ public class EnumUtilsTest {
*/
@Test
public void testEq() {
assertFalse(EnumUtils.eq(GF_8_0_0, GF_7_0_13), "Equals for a > b shall be false.");
assertFalse(EnumUtils.eq(GF_8_0_0, GF_7_0_14), "Equals for a > b shall be false.");
assertTrue(EnumUtils.eq(GF_8_0_0, GF_8_0_0), "Equals for a == b shall be true.");
assertFalse(EnumUtils.eq(GF_7_0_13, GF_6_2_5), "Equals for a > b shall be false.");
assertTrue(EnumUtils.eq(GF_7_0_13, GF_7_0_13), "Equals for a == b shall be true.");
assertFalse(EnumUtils.eq(GF_7_0_14, GF_6_2_5), "Equals for a > b shall be false.");
assertTrue(EnumUtils.eq(GF_7_0_14, GF_7_0_14), "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 @@ -72,10 +72,10 @@ public void testEq() {
*/
@Test
public void testNe() {
assertTrue(EnumUtils.ne(GF_8_0_0, GF_7_0_13), "Not equals for a > b shall be true.");
assertTrue(EnumUtils.ne(GF_8_0_0, GF_7_0_14), "Not equals for a > b shall be true.");
assertFalse(EnumUtils.ne(GF_8_0_0, GF_8_0_0), "Not equals for a == b shall be false.");
assertTrue(EnumUtils.ne(GF_7_0_13, GF_6_2_5), "Not equals for a > b shall be true.");
assertFalse(EnumUtils.ne(GF_7_0_13, GF_7_0_13), "Not equals for a == b shall be false.");
assertTrue(EnumUtils.ne(GF_7_0_14, GF_6_2_5), "Not equals for a > b shall be true.");
assertFalse(EnumUtils.ne(GF_7_0_14, GF_7_0_14), "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 @@ -96,10 +96,10 @@ public void testNe() {
*/
@Test
public void testLt() {
assertFalse(EnumUtils.lt(GF_8_0_0, GF_7_0_13), "Less than for a > b shall be false.");
assertFalse(EnumUtils.lt(GF_8_0_0, GF_7_0_14), "Less than for a > b shall be false.");
assertFalse(EnumUtils.lt(GF_8_0_0, GF_8_0_0), "Less than for a == b shall be false.");
assertFalse(EnumUtils.lt(GF_7_0_13, GF_6_2_5), "Less than for a > b shall be false.");
assertFalse(EnumUtils.lt(GF_7_0_13, GF_7_0_13), "Less than for a == b shall be false.");
assertFalse(EnumUtils.lt(GF_7_0_14, GF_6_2_5), "Less than for a > b shall be false.");
assertFalse(EnumUtils.lt(GF_7_0_14, GF_7_0_14), "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 @@ -120,10 +120,10 @@ public void testLt() {
*/
@Test
public void testLe() {
assertFalse(EnumUtils.le(GF_8_0_0, GF_7_0_13), "Less than or equal for a > b shall be false.");
assertFalse(EnumUtils.le(GF_8_0_0, GF_7_0_14), "Less than or equal for a > b shall be false.");
assertTrue(EnumUtils.le(GF_8_0_0, GF_8_0_0), "Less than or equal for a == b shall be true.");
assertFalse(EnumUtils.le(GF_7_0_13, GF_6_2_5), "Less than or equal for a > b shall be false.");
assertTrue(EnumUtils.le(GF_7_0_13, GF_7_0_13), "Less than or equal for a == b shall be true.");
assertFalse(EnumUtils.le(GF_7_0_14, GF_6_2_5), "Less than or equal for a > b shall be false.");
assertTrue(EnumUtils.le(GF_7_0_14, GF_7_0_14), "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 @@ -144,10 +144,10 @@ public void testLe() {
*/
@Test
public void testGt() {
assertTrue(EnumUtils.gt(GF_8_0_0, GF_7_0_13), "Greater than for a > b shall be true.");
assertTrue(EnumUtils.gt(GF_8_0_0, GF_7_0_14), "Greater than for a > b shall be true.");
assertFalse(EnumUtils.gt(GF_8_0_0, GF_8_0_0), "Greater than for a == b shall be false.");
assertTrue(EnumUtils.gt(GF_7_0_13, GF_6_2_5), "Greater than for a > b shall be true.");
assertFalse(EnumUtils.gt(GF_7_0_13, GF_7_0_13), "Greater than for a == b shall be false.");
assertTrue(EnumUtils.gt(GF_7_0_14, GF_6_2_5), "Greater than for a > b shall be true.");
assertFalse(EnumUtils.gt(GF_7_0_14, GF_7_0_14), "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 @@ -168,10 +168,10 @@ public void testGt() {
*/
@Test
public void testGe() {
assertTrue(EnumUtils.ge(GF_8_0_0, GF_7_0_13), "Greater than or equal for a > b shall be true.");
assertTrue(EnumUtils.ge(GF_8_0_0, GF_7_0_14), "Greater than or equal for a > b shall be true.");
assertTrue(EnumUtils.ge(GF_8_0_0, GF_8_0_0), "Greater than or equal for a == b shall be true.");
assertTrue(EnumUtils.ge(GF_7_0_13, GF_6_2_5), "Greater than or equal for a > b shall be true.");
assertTrue(EnumUtils.ge(GF_7_0_13, GF_7_0_13), "Greater than or equal for a == b shall be true.");
assertTrue(EnumUtils.ge(GF_7_0_14, GF_6_2_5), "Greater than or equal for a > b shall be true.");
assertTrue(EnumUtils.ge(GF_7_0_14, GF_7_0_14), "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 652a36f

Please sign in to comment.