sdedic commented on PR #6514: URL: https://github.com/apache/netbeans/pull/6514#issuecomment-1746489459
> [...] the "reload pom" action do download dependencies (!) (#6223), which I assume is running the priming code. Yes. > Why does NB not simply ask the user to build the project using the regular maven toolchain outside of the embedder? This could cause additional problem in future, e.g: #6190 Now it does, it actually runs `mvn install`. But IMHO it's not a good idea, as 1. we need the (internal) project load to succeed and at least resolve all referenced artifacts locally - this is done through embedder 2. we should(!) avoid compiling the project's code We need (1) for parsing, code analysis, location services to work. And (2) prolongs the time, mixes project dev errors (i.e. broken code) with project setup errors (i.e. nonexistent artifact) or environment setup errors (bad network setup, ...) Majority of NB operations actually use information extracted from the Embedder, so we need the Embedder to work/be happy in the first place ... and #6190 shows our Embedder is just not configured well enough, at last for some operations. An interesting idea would be to inject a plugin that would report all project info into the buildchain; similar to Gradle support ... but that would prevent NB to resolve queries using Maven libraries at all. If we still want to use maven libs, we IMHO need to fix the Embedder operations. > I think mvn could also run `mvn dependency:go-offline` or something similar? I was experimenting with that, but I was interrupted by higher-priority tasks. Need to look this through again to rule out possible bad analysis. If I remember right, `go-offline` was failing on me with multimodule cases for some reason. Need to re-check as several bugs were fixed from that time, that may cause those inadequate results. > > BTW - in some of the later PRs I hope I will be able to avoid running mvn install > > thats good since installing deps should not happen without user interaction IMO That `install` is hidden in the Priming action. It happens just when you resolve the problem from project problems or (initially) on project open. LSP case primes the projects as they are opened (similar to project open dialog). So no `mvn install` withou user's action. Anyway, we need to put the artifacts to a place where our internal Embedder can find them ... and ideally to a place where the external buildchain can find them to avoid duplicate downloads. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
