To find the JAR version in Gogo Shell within Liferay, you can follow these steps:
- 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
(orgosh.bat
on Windows).
- 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.
- To see the installed bundles (including JARs), use the
- Identify the Bundle:
- Look for the bundle corresponding to the JAR you’re interested in.
- Note the bundle ID associated with that bundle.
- 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.
- To get detailed information about a specific bundle (including its version), use the
- 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.
- If you want to directly extract the version from the JAR’s manifest file, you can use the following command:
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! 🚀