cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco 5.0d share resources META-INF are not included

nunocardoso
Champ in-the-making
Champ in-the-making
Hi.

I am migrating my project from 4.2e to 5.0d, and I am using the all-in-one maven archetype, sdk 2.1.1.

In my project I have custom css, js and tinymce plugins on the META-INF folder.

For the 4.2e build (mv integration -Pamp-tp-war), those files are overlayed into the war file. Yet, with the new 2.1.1 maven builds, they aren't there.

I checked  out this demo project https://github.com/gravitonian/alfresco-maven-sdk2-test.git that has META-INF files, and they are being added, but through JAR packaging. When I add the same source directories into the blank project from the maven archetype sdk 2.1.1, they aren't included anymore.

There is something during the WAR build, that somehow forgets to go to META-INF and add the files, while the JAR build works.

I am struggling to explain my issue, but I hope someone understands what I am experiencing.
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

addon META-INF contents should never be overlayed into the WAR file - they must always be included in the META-INF of the JAR file for the addon. Also, starting with Alfresco 5.1, the default META-INF contents of the Share WAR are important for module validation / dependency management purposes and must never be overriden by any addon (specifically the MANIFEST.MF). SDK 2.1.1 may already contain changes that are aimed at preventing any accidental overlay.

See <a href="https://issues.alfresco.com/jira/browse/ACE-4325">ACE-4325</a> for one issue I directly experienced with accidental overlay of META-INF. This issue also references another issue that Alfresco themselves encountered. The <a href="https://github.com/Alfresco/alfresco-sdk/issues/335">SDK issue #335</a> contains a mention that in future versions, WAR overlay may be discontinued anyway.

Regards
Axel

Took me all day to figure out where the META-INF files were going, thanks for the insight