How to find the jar version in gogo shell in Liferay?

To find the JAR version in Gogo Shell within Liferay, you can follow these steps:

  1. Access Gogo Shell:
    • You can access Gogo Shell either from the Control Panel (recommended) or from the command line.
    • If using the command line, navigate to the Liferay installation directory and run ./gosh (or gosh.bat on Windows).
  2. List Installed Bundles:
    • To see the installed bundles (including JARs), use the lb command:lb
    • This command lists all the bundles installed in Liferay’s module framework.
  3. Identify the Bundle:
    • Look for the bundle corresponding to the JAR you’re interested in.
    • Note the bundle ID associated with that bundle.
  4. Check Bundle Information:
    • To get detailed information about a specific bundle (including its version), use the headers command:headers [BUNDLE_ID]
    • Replace [BUNDLE_ID] with the actual bundle ID from step 3.
  5. Extract Version from Manifest (Alternative Method):
    • If you want to directly extract the version from the JAR’s manifest file, you can use the following command:unzip -j $LIFERAY_HOME/tomcat/lib/ext/portal-kernel.jar META-INF/MANIFEST.MF -d /tmp/; grep "^Bundle-Version" /tmp/MANIFEST.MF
    • This command unzips the portal-kernel.jar (replace with your JAR’s name) and extracts the version information from its manifest file.

Remember that the Gogo Shell provides various commands for managing bundles, services, and components in Liferay. Feel free to explore other gogo shell commands as needed! 🚀

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

close
Thanks !

Thanks for sharing this, you are awesome !