Possible to remove preinstall script?
Hello! We're using your package in frontend projects worked on by developers without Java/Maven installed on their systems. That should normally be just fine, since we're only running this package in our CI system (local development doesn't require packaging for AEM). However, due to your preinstall script that runs mvn -v, developers get an error about mvn not being found when they attempt to do a simple npm install on the frontend project. Would it be possible to remove that preinstall script so that developers aren't required to install Java/Maven?
Our workaround in the meantime is to run npm install --ignore-scripts instead.
Thanks!
Hmmm..... that's a pretty critical dependency for executing this package, so I'm hesitant to remove the check or move it to be runtime instead of install time.
@IGx89 Have you considered running npx aem-packager instead of npm run aem-packager so that this package doesn't need to be included as a dependency, and thus doesn't need Maven to be installed on your developers' workstations?
npx aem-packager isn't ideal since it still prompts to install. We ended up working around it by making aem-packager an optional dependency so it silently fails to install and doesn't block the installing of other packages. On our CI server it will succeed since it has mvn installed, though we also use --ignore-scripts there so it won't actually run the postinstall script either :p
@IGx89 I've been looking into this more, and installing as an optional dependency seems to be the most "correct" approach in the NPM ecosystem since there is no explicit way to have install for CI vs. install for local development.
I'll get a note added to readme about this