Knowledge Base
Published Jun. 30, 2025

Duplicate files in Liferay theme WAR file

Written By

Madhusudan Sharma

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.

Issue

When building a Liferay theme using Liferay Developer Studio, multiple versions of CSS and JS files are created in the compiled WAR file.

Environment

  • Liferay DXP 7.4

Resolution

To prevent duplicate files from accumulating in the theme's WAR file, configure the theme's build.gradle file. Follow these steps:

  1. Open the theme's build.gradle file.
  2. Add the following property declaration to the configuration script:
    war.duplicatesStrategy = "EXCLUDE"

Additional Information

Did this article resolve your issue ?

Knowledge Base