NPM 5 Cache cleanup
When building for example nuxeo-features/nuxeo-admin-center/nuxeo-admin-center-analytics via Maven, a failure occurs when the command npm cache clean is executed when using NPM 5:
As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent
NPM 5 has replaced the npm cache structure so in different libraries, devs have added the --force option. For instance:
--- a/nuxeo-features/nuxeo-admin-center/nuxeo-admin-center-analytics/build.xml +++ b/nuxeo-features/nuxeo-admin-center/nuxeo-admin-center-analytics/build.xml @@ -24,6 +24,7 @@ <exec executable="${cmd.npm}" failonerror="true"> <arg value="cache" /> <arg value="clean" /> + <arg value="--force" /> </exec> <exec executable="${cmd.bower}" failonerror="true"> <arg value="cache" />
It would be the same for:
- nuxeo-review-workflows-dashboards.
- nuxeo-salesforce-web.
- nuxeo-platform-spreadsheet-web.
This is fix is backward compliant