glassfish icon indicating copy to clipboard operation
glassfish copied to clipboard

Folder naming issue in 8.0.0-M1 zip archive

Open hantsy opened this issue 2 years ago • 9 comments

Environment Details

  • GlassFish Version (and build number): 8.0.0-M1
  • JDK version: 21
  • OS: Windows 10 Pro 64bit
  • Database:

In the 8.0.0 download zip archive, 8.0.0-M1 still includes a glassfish7 folder. Follow the previous release rules, it could be glassfish8.

Personally, I hope dropping this folder from zip archive, and move the content in this folder to the zip archive root directly.

hantsy avatar Dec 25 '23 12:12 hantsy

It is rather a convention to have the major version number in the root directory name in a zip file. Eclipse uses eclipse folder without version, Maven uses maven-3.9.6, JDK uses jdk8u252-b09/ or zulu-... Using root without a root folder leads to mess in the current directory when I use just unzip zipfile

But sure, there should be glassfish8.

Fyi, @arjantijms

dmatej avatar Dec 27 '23 08:12 dmatej

I suggest dropping the version number and just have glassfish directory.

I saw plenty of production installations that keep the default directory name, e.g. glassfish5 even after upgrading to a newer major version. It’s tedious to rename the directory name everywhere, in scripts, system service config, env variables, CI config, etc. It’s very confusing but they just didn’t want to risk breaking things.

OndroMih avatar Jan 01 '24 11:01 OndroMih

I suggest dropping the version number and just have glassfish directory.

I saw plenty of production installations that keep the default directory name, e.g. glassfish5 even after upgrading to a newer major version. It’s tedious to rename the directory name everywhere, in scripts, system service config, env variables, CI config, etc. It’s very confusing but they just didn’t want to risk breaking things.

I would like to see how you do an upgrade to an existing directory. It is easier to create a softlink glassfish -> glassfish7 when you have unpacked several glassfish versions than the opposite. You also cannot rename the directory later, because some paths are resolved and persisted (I am not sure if all these things were already fixed or not).

So better would be to follow the standard of JDK and Maven and Ant and use full version as the root directory.

Btw having glassfish/glassfish in the path would be ugly too.

dmatej avatar Jan 03 '24 09:01 dmatej

Btw having glassfish/glassfish in the path would be ugly too.

I was thinking about that exact same one. One of the folders would have to be renamed then to something else.

arjantijms avatar Jan 03 '24 12:01 arjantijms

This glassfishX/glassfish bit bites me a lot :-D I would like to have just a single glassfish, with a single bin directory, and mq, javadb along the other directories in glassfish, together with the modules, domains and other directories. It's all GlassFish, together with the Derby DB and OpenMQ dependencies, I don't see a reason for a subfolder named glassfish but changing this would likely break some IDEs and tools, so I'm not eager to do that.

I don't see a problem with naming the top-level directory just glassfish. If we don't want to have glassfish/lassfish, we can use eclipse-glassfish for the top level directory. Most of the people who use symlinks already rename the directory to a specific version, so they rename glassfish7 to glassfish7.0.11, for example. They would just rename eclipse-glassfish to glassfish7.0.11. There's really no point in having the number 7 or 8 in the top-level directory name. It should either just eclipse-glassfish for people that don't care, or glassfish7.X.Y symlinked to eclipse-glassfish for those who care.

This doesn't make any difference to an upgrade. If there's a symlink eclipse-glassfish to a directory glassfish7.0.10 and I want to upgrade to 7.0.11, I would just delete the eclipse-glassfish symlink, unpack to eclipse-glassfish directory, rename the directory to glassfish7.0.11 and then create a symlink eclipse-glassfish to glassfish7.0.11. It's certainly better than having a glassfish7 symlink pointing to a glassfish8 directory.

OndroMih avatar Jan 03 '24 15:01 OndroMih

That is more steps than "unpack and run" and later create a symlink (after verification that new production version is alright). I think that this is also why JDK and Maven do that "my way" and not the way you suggest. Once you just unzip you should see which folder came from which zip file.

dmatej avatar Jan 03 '24 17:01 dmatej

IMHO, it makes sense that the parent directories of Derby and OpenMQ are labeled with the GlassFish version. This is because the versions of those included in GlassFish vary depending on the GlassFish version.

hs536 avatar Jan 04 '24 01:01 hs536

That is more steps than "unpack and run" and later create a symlink (after verification that new production version is alright). I think that this is also why JDK and Maven do that "my way" and not the way you suggest. Once you just unzip you should see which folder came from which zip file.

OK, this is getting too philosophical. But you have a point. I just think that having only the major version in the parent directory is the worst solution of all the options we discussed. It's confusing, breaks with a new major version and can't be used with just "unpack and run" if a user upgrades to a new minor version.

Maven's behavior, which you mention, is much better - having the full version in the directory name and then just refresh the symlink. Some tools which rely on a fixed naming (e.g. expect glassfish7 directory when the ZIP unpacked, e.g. Arquillian) would need to be updated but I think it's worth it. If I understood correctly, @hs536 also suggests this.

OndroMih avatar Jan 04 '24 01:01 OndroMih

Many good points raised here. For not I've updated it to "glassfish8" in the milestone branch for 8, as it's better than "glassfish7" at least. Meanwhile we can discuss for a better naming and/or version going forward.

arjantijms avatar Jan 04 '24 12:01 arjantijms

This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment

github-actions[bot] avatar Jan 04 '25 00:01 github-actions[bot]