I am using the frontend-maven-plugin
to run npm
commands during the build process. The npm
commands run fine, but the build fails when trying to copy resources:
[DEBUG] file semver has a filtered file extension
[DEBUG] Using 'UTF-8' encoding to copy filtered resource 'semver'.
[DEBUG] copy /[...]/src/main/resources/emails/node_modules/normalize-package-data/node_modules/.bin/semver to /[...]/target/classes/emails/node_modules/normalize-package-data/node_modules/.bin/semver
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.066 s
[INFO] Finished at: 2021-05-17T11:33:04+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project [...]: /[...]/target/classes/emails/node_modules/normalize-package-data/node_modules/.bin/semver -> [Help 1]
[...]
Caused by: java.nio.file.NoSuchFileException: /[...]/target/classes/emails/node_modules/normalize-package-data/node_modules/.bin/semver
However, the file does exist.
~/[...]/target/classes/emails/node_modules/normalize-package-data/node_modules/.bin $ ls -@l
total 0
lrwxr-xr-x 1 [...] [...] 20 17 May 11:33 semver -> ../semver/bin/semver
What can I do to stop this happening, given that the plugin otherwise appears to be working as intended?