-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unpack node.js to local maven repo so it is reused after 'mvn clean' #9
Comments
Hi! From your post I understand the need for a higher build speed and preventing this plugin from always doing the same extract-operation would serve that purpose. I however don't like the idea of extracting files inside the local maven repository. I consider that the domain of Maven's dependency system, something individual plugins should not be performing operations on, outside of Maven's own API. As an alternative we could introduce a new boolean parameter called Would this solution work for you? |
(This is the same Jens; I switched to another account) I understand your caution about putting stuff inside the maven repo. However, your proposed alternative would not work. We do I came up with the maven repo as it is considered a long-term storage (even on our continuous integration server), and because the node.js binary, like the maven artifacts, is versioned, so there's no reason to unpack the same version again, ever. I would propose researching/asking whether it is acceptable for maven plugins to write additional stuff inside the local repo. If it really isn't, do this:
|
There already is a parameter which defines where the node binary is extracted. It's called So I guess with an added I'd like to know if it works for you before I go through all the maven plugin publishing steps and make it a proper release. |
Have you checked the snapshot version? |
Yes, the Note that I included the plugin version in the target directory name to make sure the binaries are overwritten when the plugin version changes (which may ship newer nodejs binaries). |
Both our CI server and our developers often use
mvn clean install
to ensure the build is in a consistent state. Asnodejs-maven-plugin
unpacks the node.js binary to the project folder, this step is repeated each time even though most of the time the build uses the same node.js binary as the last build. This slows down builds considerably.I propose that instead of defining
<targetDirectory>
, the plugin should allow an optional parameter that makes it download the node.js binary into the local maven repository, using a path that includes the version. The plugin could then store the path to the binary in a variable for use by other plugins.This way, the plugin could simply skip the download step when the current release was already downloaded.
The text was updated successfully, but these errors were encountered: