Defect #3260
openBuilding war using aggregator results in frontend not being correctly packaged
Updated by Luděk Urban over 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?