Project

General

Profile

Actions

Defect #3260

open

Building war using aggregator results in frontend not being correctly packaged

Added by Peter Štrunc about 1 year ago. Updated about 1 year ago.

Status:
In Progress
Priority:
Normal
Assignee:
Peter Štrunc
Category:
-
Target version:
-
Start date:
03/01/2023
Due date:
% Done:

0%

Estimated time:
Affected versions:
Owner:
Actions #1

Updated by Luděk Urban about 1 year ago

I was trying to debug the missing front-end problem during build.

There is a problem in current pom configuration where steps are executed in this order:

clean-node-modules, copy-fe-sources, install node and npm, app install npm, app gulp install, gulp build

Because copy-fe-sources is before the front-end is built, the front-end will not be copied to "target/idm/fe-sources" when the first build is made.
On the second build, because the copy-fe-sources is a after clean-node-modules step, front-edn is copied correctly.
Clean-node-modules deletes ${workspace}/Realization/frontend/czechidm-app/node_modules so there won't be looped links that would stuck the copying of frontend.

Looped links

${workspace}/Realization/frontend/czechidm-app/node_modules/czechidm-* -> ${workspace}/Realization/frontend/czechidm-app/czechidm-modules/czechidm-*

${workspace}/Realization/frontend/czechidm-app/czechidm-modules/czechidm-* -> ${workspace}/Realization/frontend/czechidm-*

${workspace}/Realization/frontend/czechidm-*/node_modules -> ${workspace}/Realization/frontend/czechidm-app/node_modules


When order of executed steps is reversed:

clean-node-modules, install node and npm, app install npm, app gulp install, gulp build, copy-fe-sources

The copy would hang and the build would fail because there are loop references.

Problem is probably in excluding node_modules directories which contains these links.

<excludes>
    <exclude>**/dist/**</exclude>
    <exclude>**/czechidm-modules/**/node_modules/**</exclude>
    <exclude>**/node_modules/**</exclude>
    <exclude>node_modules/**</exclude>
    <exclude>**/.*</exclude>
</excludes>

@sourek @potociarj
Can I ask you to add debug of this issue to your next sprint if you have time?

Actions

Also available in: Atom PDF