How to overcome BOMs pointing to wrong JARs?
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
legacy-article
learn-legacy-article-disclaimer-text
Resolution
- To prevent such issues, consider utilizing the fat-jar (or mega-jar) as outlined in the Managing the Target Platform article.
- Using
com.liferay.portal.kernel
as an example, what you would do to fix the issue is to replace all instances of this:
group: "com.liferay.portal", name: "com.liferay.portal.kernel"
And instead use the release.dxp.api
megajar dependency:
group: "com.liferay.portal", name: "release.dxp.api"
If you already importing release.dxp.api
, then remove the com.liferay.portal.kernel
dependency,
- The
portal-kernel
compiled (portal-kernel.jar
) and its source code is available through the BOMs, release.dxp.api-202x.qx.x.jar
and release.dxp.api-202x.qx.x-sources.jar
, respectively. These BOMs and all other BOMs are downloaded when a Liferay Workspace is built targeting the version 202x.qx.x.
did-this-article-resolve-your-issue