From Gogo Shell, get version of com.liferay.portal.kernel

1.5k Views Asked by At

All I have is a Gogo Shell connection to a Liferay server.

From that shell, is there any way to know the version of the com.liferay.portal.kernel package used by that server?

For instance, if I want to know the version of the com.liferay.util.taglib package I would type lb | grep Taglib | grep Util and see that the version is 2.9.0, but the same method does not seem to work for the kernel package.

3

There are 3 best solutions below

2
On BEST ANSWER

portal-kernel.jar is still in the global classpath (lib/ext folder). Not sure you can handle it through the OSGi container.

You can check the installed version in its manifest file inside that jar.

Anyways, I guess you're asking in order to set the dependency in your developments. If that's the case, I would recomend to set the older version you can use in terms of compatibility (see a post by Nebinger talking about that: https://community.liferay.com/es/blogs/-/blogs/choosing-osgi-versions-during-development)

Your best bet is not always using the latest version for a dependency.

0
On

Maybe using gogo shell is not possible.

You can reach the version number calling json web service:

λ curl http://localhost:8080/api/jsonws/portal/get-build-number -u user:pwd

2
On

You could also use:

lb | grep Foundation

To fetch the "Liferay Foundation" Version which correspond to something like 7.0.72 for a DXP7.0 environment. I am not sure if this applies to DXP7.1 as well.