Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bundles/org.glassfish.eclipse.tools.server/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ runtimeTypeVendor=Oracle Corporation
runtimeTypeGlassFishVendor=GlassFish

runtimeTypeNameglassfish=GlassFish
runtimeTypeDescriptionglassfish=Supports GlassFish 7, 6, 5, 4 and 3.1
runtimeTypeDescriptionglassfish=Supports GlassFish 8, 7, 6, 5, 4 and 3.1
serverTypeNameglassfish=GlassFish
serverTypeDescriptionGlassFish=Supports GlassFish Server 7, 6, 5 and 4.
serverTypeDescriptionGlassFish=Supports GlassFish Server 8, 7, 6, 5 and 4.

glassfish.server.runConfigurationName=GlassFish Server

Expand Down
20 changes: 17 additions & 3 deletions bundles/org.glassfish.eclipse.tools.server/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<runtime-component-version type="glassfish.runtime" version="5"/>
<runtime-component-version type="glassfish.runtime" version="6"/>
<runtime-component-version type="glassfish.runtime" version="7"/>
<runtime-component-version type="glassfish.runtime" version="8"/>

<supported>
<runtime-component id="glassfish.runtime" version="3.1"/>
Expand Down Expand Up @@ -146,14 +147,27 @@
<runtime-component id="glassfish.runtime" version="7"/>
<facet id="glassfish.web" version="7]"/>
<facet id="glassfish.ejb" version="7]"/>
<facet id="jst.web" version="6.1]"/>
<facet id="jst.ejb" version="3.2]"/>
<facet id="jst.web" version="6.0]"/>
<facet id="jst.ejb" version="4.0]"/>
<facet id="jst.ear" version="8.0]"/>
<facet id="jst.connector" version="1.7]"/>
<facet id="jst.connector" version="2.1]"/>
<facet id="jst.appclient" version="8.0]"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.webfragment" version="6.0]" />
</supported>

<supported>
<runtime-component id="glassfish.runtime" version="8"/>
<facet id="glassfish.web" version="8]"/>
<facet id="glassfish.ejb" version="8]"/>
<facet id="jst.web" version="6.1]"/>
<facet id="jst.ejb" version="4.0]"/>
<facet id="jst.ear" version="10.0]"/>
<facet id="jst.connector" version="2.1]"/>
<facet id="jst.appclient" version="10.0]"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.webfragment" version="6.1]" />
</supported>
</extension>

<extension point="org.eclipse.wst.common.project.facet.core.runtimes">
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.glassfish.eclipse.tools.server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.8.1</version>
<version>1.10.15</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ public final class GlassFishRuntime extends RuntimeDelegate implements IJavaRunt
private static final VersionConstraint VERSION_CONSTRAINT_3_1 = new VersionConstraint("[1.6-1.7]");
private static final VersionConstraint VERSION_CONSTRAINT_4 = new VersionConstraint("[1.7");
private static final VersionConstraint VERSION_CONSTRAINT_5 = new VersionConstraint("[1.8");
private static final VersionConstraint VERSION_CONSTRAINT_6 = new VersionConstraint("[1.8");
private static final VersionConstraint VERSION_CONSTRAINT_7 = new VersionConstraint("[11");

private static final VersionConstraint VERSION_CONSTRAINT_6_0 = new VersionConstraint("[1.8");
private static final VersionConstraint VERSION_CONSTRAINT_6_1 = new VersionConstraint("[11");
private static final VersionConstraint VERSION_CONSTRAINT_7_0 = new VersionConstraint("[11");
private static final VersionConstraint VERSION_CONSTRAINT_7_1 = new VersionConstraint("[17");
private static final VersionConstraint VERSION_CONSTRAINT_8 = new VersionConstraint("[21");

protected static final String PROP_VM_INSTALL_TYPE_ID = "vm-install-type-id";
protected static final String PROP_VM_INSTALL_ID = "vm-install-id";

Expand Down Expand Up @@ -158,15 +161,7 @@ public static String createDefaultRuntimeName(Version version) {
String baseName = "GlassFish Server"; // TODO: - detect GF

if (version != null) {
if (version.matches("[6-7)")) {
baseName += " 6";
} else if (version.matches("[5-6)")) {
baseName += " 5";
} else if (version.matches("[4-5)")) {
baseName += " 4";
} else if (version.matches("[3.1-4)")) {
baseName += " 3.1";
}
baseName += (" " + version.segment(0));
}

baseName += " (" + version + ")";
Expand Down Expand Up @@ -223,7 +218,7 @@ public IStatus validateVersion() {
return new Status(ERROR, SYMBOLIC_NAME, runtimeNotValid);
}

if (!version.matches("[3.1-8)")) {
if (!version.matches("[3.1-9)")) {
return new Status(ERROR, SYMBOLIC_NAME, unsupportedVersion);
}

Expand All @@ -234,19 +229,31 @@ public VersionConstraint getJavaVersionConstraint() {
Version version = getVersion();

if (version != null) {
if (version.matches("[7")) {
return VERSION_CONSTRAINT_7;
if (version.compareTo(new Version("8.0.0")) >= 0) {
return VERSION_CONSTRAINT_8;
}

if (version.matches("[6")) {
return VERSION_CONSTRAINT_6;

if (version.compareTo(new Version("7.1.0")) >= 0) {
return VERSION_CONSTRAINT_7_1;
}

if (version.compareTo(new Version("7.0.0")) >= 0) {
return VERSION_CONSTRAINT_7_0;
}

if (version.compareTo(new Version("6.1.0")) >= 0) {
return VERSION_CONSTRAINT_6_1;
}

if (version.compareTo(new Version("6.0.0")) >= 0) {
return VERSION_CONSTRAINT_6_0;
}

if (version.matches("[5")) {
if (version.compareTo(new Version("5.0.0")) >= 0) {
return VERSION_CONSTRAINT_5;
}

if (version.matches("[4")) {
if (version.compareTo(new Version("4.0.0")) >= 0) {
return VERSION_CONSTRAINT_4;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public final class GlassFishServer extends ServerDelegate implements IURLProvide

@Override
protected void initialize() {
logMessage("in GlassFishServer initialize" + this.getServer().getName()); //$NON-NLS-1$
logMessage("in GlassFishServer initialize " + this.getServer().getName()); //$NON-NLS-1$

if (getServerWorkingCopy() != null) {
readDomainConfig();
Expand Down Expand Up @@ -249,6 +249,14 @@ public String getDebugOptions(int debugPort) {
return "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=" + debugPort;
}

public String getVersionSpecificJavaArgs() {
Version version = getVersion();
if (version.compareTo(new Version("7.1.0")) >= 0) {
return "--module-path " + getServerInstallationDirectory() + separator + "lib" + separator + "bootstrap --add-modules ALL-MODULE-PATH";
}
return "";
}

private void readDomainConfig() {
if (!isRemote()) {
if (readServerConfiguration(
Expand Down Expand Up @@ -348,7 +356,7 @@ public IStatus validateDomainLocation(String domainPath) {
*/
public IStatus validate() {

logMessage("in validate");
logMessage("in validate");
IStatus status = null;
if (!isRemote()) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runtimeName=Runtime Name
emptyRuntimeName=Runtime name is required!
duplicateRuntimeName=Runtime name {0} is already used!
runtimeIdentified=Found GlassFish Server version {0}.
unsupportedVersion=Only GlassFish 6, 5, 4 and 3.1 are supported
unsupportedVersion=Only GlassFish 8, 7, 6, 5, 4 and 3.1 are supported
versionsNotMatching=The versions of local and remote server do not match.
runtimeNotValid=There is no valid GlassFish runtime in specified directory.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,7 @@ private static final IRuntime findRuntime(final String id) {
}

private static final String getGlassfishMainVersion(final Version glassfishVersion) {
if (glassfishVersion.matches("[7")) {
return "7";
}

if (glassfishVersion.matches("[6")) {
return "6";
}

if (glassfishVersion.matches("[5")) {
return "5";
}

if (glassfishVersion.matches("[4")) {
return "4";
}

return "3.1";
return Long.toString(glassfishVersion.segment(0));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@
import static org.glassfish.eclipse.tools.server.sdk.utils.JavaUtils.javaVmExecutableFullPath;
import static org.glassfish.eclipse.tools.server.sdk.utils.JavaUtils.javaVmVersion;
import static org.glassfish.eclipse.tools.server.sdk.utils.OsUtils.parseParameters;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.GFV3_JAR_MATCHER;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.getDomainConfigPath;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.getJarName;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.getGFV3JarName;
import static org.glassfish.eclipse.tools.server.sdk.utils.Utils.quote;

import java.io.File;
Expand Down Expand Up @@ -206,7 +205,7 @@ private static String buildJavaOptions(GlassFishServer server, CommandStartDAS c
if (command.classPath != null && command.classPath.length() > 0) {
javaOptionsBuilder.append(command.classPath);
} else {
javaOptionsBuilder.append(quote(getJarName(server.getServerHome(), GFV3_JAR_MATCHER).getAbsolutePath()));
javaOptionsBuilder.append(quote(getGFV3JarName(server.getServerHome()).getAbsolutePath()));
}
javaOptionsBuilder.append(' ');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@
import static org.glassfish.eclipse.tools.server.sdk.server.parser.TreeParser.readXml;
import static org.glassfish.eclipse.tools.server.sdk.utils.JavaUtils.javaVmExecutableFullPath;
import static org.glassfish.eclipse.tools.server.sdk.utils.JavaUtils.javaVmVersion;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.GFV3_JAR_MATCHER;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.GF_DERBY_ROOT_PROPERTY;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.GF_DOMAIN_ROOT_PROPERTY;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.GF_HOME_PROPERTY;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.GF_JAVA_ROOT_PROPERTY;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.getDerbyRoot;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.getDomainPath;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.getJarName;
import static org.glassfish.eclipse.tools.server.sdk.utils.ServerUtils.getGFV3JarName;

import java.io.File;
import java.nio.file.Path;
Expand Down Expand Up @@ -165,7 +164,7 @@ public static ResultProcess startServer(GlassFishServer server, StartupArgs args
addJavaAgent(server, jvmConfigReader);

// Try to find bootstraping jar - usually glassfish.jar
File bootstrapJar = getJarName(server.getServerHome(), GFV3_JAR_MATCHER);
File bootstrapJar = getGFV3JarName(server.getServerHome());
if (bootstrapJar == null) {
throw new GlassFishIdeException(LOGGER.excMsg(METHOD, "noBootstrapJar"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

import org.glassfish.eclipse.tools.server.GlassFishServer;
import org.glassfish.eclipse.tools.server.utils.Version;
Expand Down Expand Up @@ -70,19 +71,8 @@ public class ConfigBuilderProvider {
* @return Library builder configuration for given GlassFish server version.
*/
public static URL getBuilderConfig(final Version version) {
if (version.matches("[7")) {
return ConfigBuilderProvider.class.getResource("GlassFishV7.xml");
}

if (version.matches("[6")) {
return ConfigBuilderProvider.class.getResource("GlassFishV6.xml");
}

if (version.matches("[5")) {
return ConfigBuilderProvider.class.getResource("GlassFishV5.xml");
}

return ConfigBuilderProvider.class.getResource("GlassFishV4.xml");
URL resource = ConfigBuilderProvider.class.getResource("GlassFishV" + version.segment(0) + ".xml");
return Optional.ofNullable(resource).orElse(ConfigBuilderProvider.class.getResource("GlassFishV8.xml"));
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<server>
<tools lib="lib">
<asadmin jar="client/appserver-cli.jar"/>
</tools>

<java version="21">
<platform version="11"/>
<platform version="12"/>
<platform version="13"/>
<platform version="14"/>
<platform version="15"/>
<platform version="16"/>
<platform version="17"/>
<platform version="18"/>
<platform version="19"/>
<platform version="20"/>
<platform version="21"/>
<platform version="22"/>
<platform version="23"/>
<platform version="24"/>
<platform version="25"/>
</java>

<javaee version="11.0.0">
<profile version="9.0.0" type="web"/>
<profile version="9.0.0" type="full" check="full"/>
<profile version="9.1.0" type="web"/>
<profile version="9.1.0" type="full" check="full"/>
<profile version="10.0.0" type="web"/>
<profile version="10.0.0" type="full" check="full"/>
<profile version="11.0.0" type="web"/>
<profile version="11.0.0" type="full" check="full"/>
<module type="war"/>
<module type="car" check="full"/>
<module type="ear" check="full"/>
<module type="ejb" check="full"/>
<module type="rar" check="full"/>
<check name="full">
<file path="appclient-server-core.jar"/>
</check>
</javaee>

<library id="Jakarta EE">
<classpath>
<fileset dir="modules">
<include name="jakarta\..+\.jar"/>
<include name="jakarta.validation-api.jar"/>
<include name="jakarta.enterprise.cdi-api.jar"/>
<include name="jaxb-osgi.jar"/>
<include name="webservices-osgi.jar"/>
<include name="weld-osgi-bundle.jar"/>
</fileset>
<fileset dir="../mq/lib">
<include name="jaxm-api.jar"/>
</fileset>
</classpath>
<javadocs>
<lookup path="docs/jakartaee11-doc-api.jar"/>
</javadocs>
<sources>
</sources>
</library>

<library id="MicroProfile">
<classpath>
<fileset dir="modules">
<include name="microprofile.*\-api.jar"/>
</fileset>
</classpath>
<javadocs>
</javadocs>
<sources>
</sources>
</library>

<library id="Jersey 3">
<classpath>
<fileset dir="modules">
<include name="jackson.+\.jar"/>
<include name="jersey.+\.jar"/>
<include name="jettison.*\.jar"/>
</fileset>
</classpath>
<javadocs>
<link url="https://repo1.maven.org/maven2/org/glassfish/jersey/jersey-documentation/3.1.0/jersey-documentation-3.1.0-docbook.zip"/>
</javadocs>
<sources>
</sources>
</library>

<library id="JAX-RS">
<classpath>
<fileset dir="modules">
<include name=".+\.ws.rs-api.jar"/>
</fileset>
</classpath>
<javadocs>
</javadocs>
<sources>
</sources>
</library>
</server>
Loading