Skip to content
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

JNPM maven plugin: caching seems not working #19

Open
amseager opened this issue Jul 12, 2022 · 3 comments
Open

JNPM maven plugin: caching seems not working #19

amseager opened this issue Jul 12, 2022 · 3 comments

Comments

@amseager
Copy link

I have useCache=true set.
Everytime, when I launch install goal, a new request to the registry occurs for the same packages even if I have them in <home-dir>/cache/ already.

[INFO] --> GET http://registry.npmjs.org/vue
[INFO] --> END GET
[INFO] <-- 200 OK https://registry.npmjs.org/vue (272ms)

What should I do to get rid of these unnecessary requests?

@PhantomYdn
Copy link
Member

@amseager, cache is being used for downloaded files - but not for metadata. For package metadata JNPM still need to have access to NPM registry. If that's an issue for you - please explain your case in more details - potentially we can invent something to cover the case.

@amseager
Copy link
Author

Ah, didn't fully understand the meaning of that property.

I actually don't have any problems at the moment, although I can imagine a couple of situations when you cannot build your project because of it (but you could do it potentially if you have all required packages in your local cache):

  • you simply have no access to the Internet / default npm registry (or things like that)
  • you can have a company's internal registry which is available only via VPN, and you're always forced to connect to it for making requests to that registry

@PhantomYdn
Copy link
Member

I see. Let me think about it... The main usecase for useCache=false was the following: during development process the same package being pushed to a repository under the same version again and again. So to avoid using an old version from cache, this flag was introduced to be able to request tar.gz package every time during build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants