Does anyone know if there will be support for GlassFish 5 in Eclipse in nearer future (GlassFish Tools supports 3.1 and 4.x)?
Is there another way to integrate Glassfish in Eclipse besides GlassFish Tools?
Does anyone know if there will be support for GlassFish 5 in Eclipse in nearer future (GlassFish Tools supports 3.1 and 4.x)?
Is there another way to integrate Glassfish in Eclipse besides GlassFish Tools?
GlassFish Tools just checks for a version as follows:
Version version = getVersion();
if (!version.matches("[3.1-5)")) {
return new Status(Status.ERROR, GlassfishToolsPlugin.SYMBOLIC_NAME, Messages.unsupportedVersion);
}
Where getVersion()
is obtained from reading [install dir]/glassfish/modules/glassfish-api.jar!META-INF/MANIFEST.MF
and then the Bundle-Version
entry.
So a hacky way to get Eclipse working with GlassFish 5 and Payara 5 is:
4
and make sure digits are all single (i.e. 181 should become 0 or so)Now you can add a runtime and server for GlassFish 5 and Payara 5 as you would normally do, and start, debug, deploy etc.
For illustration, the entry to be changed looks as follows:
Bundle-Name: Public APIs of Glassfish
Bundle-Version: 5.181.0.Alpha4-SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Build-Jdk: 1.8.0_144
Should become:
Bundle-Name: Public APIs of Glassfish
Bundle-Version: 4.0.0.Alpha4-SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Build-Jdk: 1.8.0_144
The GlassFish tooling is currently in proposal to be donated to Eclipse, so it may take a while to be updated. Meanwhile, I'm planning to create a derivative version before long with some extra enhancements, but that too may take some time.
Eclipse Oxygen.3a (4.7.3a) now supports Glassfish 5
for Eclipse photon users checkout my question and the chosen answer Cannot install Glassfish tools in Eclipse photon
Unfortunately there's no support yet, but you could build your JavaEE app (EAR,WAR) grab the .war|ear
file and paste it in
[GF_LOCATION]\glassfish5\glassfish\domains\[DOMAIN]\autodeploy\
Then go to [GF_LOCATION]\glassfish5\bin\
Open a terminal and run:
asadmin start-domain [DOMAIN]
If you've configured your app correctly, you should be able to access you application locally, something like:
localhost:8080/YourApp/
If you require a datasource
and connection_pool
then from bin, run:
asadmin add-resources [location_to_you_app's_glassfish-resources.xml]
This should add the configuration needed in GF5 to run your app.
Use Netbeans, I've been able to configure Glassfish 5 in netbeans. Unfortunately, currente version, 8.2 doesn't have JavaEE 8 detection and automatic file completion yet, so you will have to add this configuration manually if you plan to use JSF 2.3,Servlet 4.0, etc ...
, but at least you are able con configure and run you applications from your IDE onto Glassfish 5.
To integrate payara5 with Eclipse 4.7.1a via Oracle "GlassFish Tools" I hat to modify within file \payara5\glassfish\modules\glassfish-api.jar the file META-INF\MANIFEST.MF at the end of the content as follows:
...;version="4.0.0" Bundle-Name: Public APIs of Glassfish Bundle-Version: 4.0 Created-By: Apache Maven Bundle Plugin Build-Jdk: 1.8.0_152