Eclipse GlassFish is a Jakarta EE compatible implementation sponsored by the Eclipse Foundation.
| GlassFish Version | Jakarta EE Version | Java Requirements |
|---|---|---|
| 8.0.0 | Jakarta EE 11 | Java 21, 25 |
| 7.1.0 | Jakarta EE 10 | Java 17, 21, 25 |
| 7.0.25 | Jakarta EE 10 | Java 11, 17, 21 |
| 6.2.5 | Jakarta EE 9.1 | Java 11, 17 |
| 6.1.0 | Jakarta EE 9.1 | Java 11 |
| 6.0.0 | Jakarta EE 9 | Java 8 |
| 5.1.0 | Java EE 8 / Jakarta EE 8 | Java 8 |
After building, find distributions at:
- GlassFish Server Full Profile:
appserver/distributions/glassfish/target/glassfish.zip - GlassFish Server Web Profile:
appserver/distributions/web/target/web.zip - Embedded GlassFish All:
appserver/extras/embedded/all/target/glassfish-embedded-all.jar - Embedded GlassFish Web:
appserver/extras/embedded/web/target/glassfish-embedded-web.jar
- JDK21+
- Maven 3.9.0+
mvn clean install- Full build including documentation, automatic QA, checkstyle and all maven managed tests. Excludes just Ant and TCK tests. Typical time: 15 minutes.mvn clean install -Pqa- Building all distribution artifacts, running QA, checkstyle and all maven managed tests. Excludes Ant, TCK and documentation. Typical time: 10 minutes.mvn clean install -Pfast- Building all distribution artifacts, running just unit tests. Excludes QA, checkstyle, integration tests, Ant, TCK and documentation. Typical time: 7 minutes.mvn clean install -Pfastest -T4C- Building all distribution artifacts as fast as possible. Excludes everything not serving this purpose. Typical time: 1.5 minutes.
After the build, you can run GlassFish in the following ways:
- Run GlassFish server directly: Navigate to
appserver/distributions/glassfish/target/stage/glassfish8- it is an unpacked version of GlassFish Full. Then you can run it as usual, e.g. withbin/startserv - Run GlassFish server from a ZIP: A zip file is generated either at
appserver/distributions/glassfish/target/glassfish.zipor in your local maven repository, e.g. at<HOME>/.m2/repository/org/glassfish/main/distributions/glassfish/<VERSION>/glassfish-<VERSION>.zip. Unpack it and run as usual - Run Embedded GlassFish: Find the JAR file at
appserver/extras/embedded/all/target/glassfish-embedded-all.jaror in your local maven repository, e.g. at<HOME>/.m2/repository/org/glassfish/main/extras/glassfish-embedded-all/<VERSION>/glassfish-embedded-all-<VERSION>.jar. Then run it withjava -jar glassfish-embedded-all.jar`
You can use also some maven optimizations, see Maven documentation.
Especially -am, -amd, -f, -pl, -rf and their combinations are useful.
If you use Maven 3.9+, we recommend that you copy the .mvn/maven.config.template file into .mvn/maven.config and uncomment one of the options there or customize the options as you need. Then you can just run mvn clean install and the options in maven.config will be applied automatically. Or with just mvn, the default goal will be run with those options. See Configuring Maven Documentation
If you want to see more logs you can use the -Dtest.logLevel=FINEST option set to an appropriate log level.
Note that this applies just for tests which are executed by Maven and which use the GlassFish Java Util Logging Extension (GJULE).
staging- In some development stages it may happen that some dependencies are available just in the OSSRH staging repository. Then you have to use this profile, which is not enabled by default.jacoco- enables the JaCoCo agent in tests, so you can import its output to your editor, i.e. Eclipse, and see the code coverage.jacoco-merge- merges all JaCoCo output files found in subdirectories and merges them into one. It is useful to see code which wasn't even touched by tests.
./updateVersion.sh 6.99.99.experimental- useful for custom distributions, so you can avoid conflicts with version in master branch../runtests.sh [testBlockName] [?glassfishVersion]- useful to run old additional tests locally./validateJars.sh- uses the bnd command to check OSGI dependencies in all target directories
After building the GlassFish distribution artifacts you can execute also additional tests managed by bash scripts. They are quite old and have high technical debt, but at this moment they still provide useful service.
mvn -f appserver/tests/quicklook/pom.xml test -Dglassfish.home=$(pwd)/appserver/distributions/glassfish/target/stage/glassfish8/glassfish
- Usual time: 3 minutes
- see QuickLook_Test_Instructions
-
./runtests.sh batch_all- Usual time: 1 minute -
./runtests.sh cdi_all- Usual time: 6 minutes -
./runtests.sh connector_group_1- Usual time: 16 minutes -
./runtests.sh connector_group_2- Usual time: 3 minutes -
./runtests.sh connector_group_3- Usual time: 4 minutes -
./runtests.sh connector_group_4- Usual time: 16 minutes -
./runtests.sh deployment_all- Usual time: 8 minutes -
./runtests.sh ejb_group_1- Usual time: 10 minutes -
./runtests.sh ejb_group_2- Usual time: 7 minutes -
./runtests.sh ejb_group_3- Usual time: 18 minutes -
./runtests.sh ejb_group_embedded- Usual time: 4 minutes -
./runtests.sh ejb_group_all- Usual time: 4 minutes -
./runtests.sh jdbc_all- Usual time: 20 minutes -
./runtests.sh naming_all- Usual time: 2 minutes -
./runtests.sh persistence_all- Usual time: 3 minutes -
./runtests.sh security_all- Usual time: 8 minutes -
./runtests.sh web_jsp- Usual time: 8 minutes -
./runtests.sh webservice_all- Usual time: 10 minutes -
./runtests.sh ejb_web_all- Usual time: 4 minutes -
./runtests.sh ql_gf_web_profile_all- Usual time: 2 minutes -
./runtests.sh ql_gf_full_profile_all- Usual time: 4 minutes -
many tests under appserver/tests subdirectories; they are still waiting for someone's attention.
The pull request workflow is described on Eclipse GlassFish / workflow.
Build server results of pull requests can be found at CI Glassfish.
- Starting Eclipse GlassFish:
glassfish8/bin/asadmin start-domain - Visit http://localhost:4848
- Stopping Eclipse GlassFish:
glassfish8/bin/asadmin stop-domain
For production deployments, consider the following security measures:
- Disable the Admin Console: The web-based Administration Console should be disabled in production environments to reduce attack surface and prevent CSRF attacks where malicious links can execute admin commands. Use
asadmin set server.admin-service.property.adminConsoleStartup=neverand restart the domain. - Enable Secure Admin: Use
asadmin enable-secure-adminto secure administrative communications. - Use strong passwords: Change default passwords and use strong authentication.
For comprehensive security guidance, see the Security Guide.
This section is dedicated to companies offering products and services around Eclipse GlassFish.
The Eclipse GlassFish project does not endorse or recommend any of the companies on this page. We love all our supporters equally.
Professional Services and Enterprise support are available through following companies: