kerimovkhikmet commented on issue #11242:
URL: https://github.com/apache/maven/issues/11242#issuecomment-3390594340

   > Maybe it would be better to make `sbt` smarter? I must confess I don't 
really understand the workflow here and how the dependencies are actually 
managed downloading "everything" would certainly work but will increase the 
sieze enormously. And if maven do not download it why `sbt` is needing it?
   
   Not `sbt` per se, but the tools used for managing artifacts for sbt: ivy and 
coursier. During artifact resolution, each of those tools finds a POM in the 
local `~/.m2` repository, and assumes that it is a complete repository, i.e., 
has every required artifact, when in reality it does not. Now, one way is to 
make both ivy and coursier "smarter", and other resolver tools in the 
ecosystem, is to not make that assumption based on the availability of the 
single POM file in the local repository. Another way is to make something with 
Maven's resolver, to somehow control the creation of the incomplete local 
repositories.
   
   > In any case what I do in such case is using adding an execution of 
[dependency:copy-dependencies](https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html)
 to the parent pom bound e.g. to `compile` phase. This will then for sure 
download everything and even put it into a folder that you can direct your tool 
to consume it from (or just ignore it if you like).
   
   Thank you, I'll give it a try and will let you know the results.


-- 
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]

Reply via email to