Is dependency resolution against local repository possible when building test repository? #293
Replies: 3 comments 2 replies
-
It occurs to me as I write the above, that the single test we currently have creates a test_method_name/.m2/repository of ~ 70Mb. We've contemplated refactoring 16 tests to use the maven-it-extension. After a test suite runs we'll have well over 1Gb of test repos on the filesystem that will need to be cleared up. |
Beta Was this translation helpful? Give feedback.
-
The first thing is using the configured remote repository (your Furthermore If you have a set of dependencies which is needed to be existing in your local repository for your IT you should check the documentation (https://khmarbaise.github.io/maven-it-extension/itf-documentation/usersguide/usersguide.html#_predefined_repository_content_for_tests). It is also possible to use a single cache for all of your tests (or a set of them) which I can not recommend because it could influence each other... see https://khmarbaise.github.io/maven-it-extension/itf-documentation/usersguide/usersguide.html#_common_maven_cache |
Beta Was this translation helpful? Give feedback.
-
The invoker plugin sets a property named So the running test will first try to "download" an artifact from I tested this with ITF by using a test-local
I think it would be useful if ITF would also provide something like Regards, |
Beta Was this translation helpful? Give feedback.
-
We're writing a plugin that has a substantial set of dependencies. When testing the plugin using maven-it-extension, it takes ~ 6 minutes to build the test_method_name/.m2/repository because as far as I can make out, all the dependencies are being downloaded from our remote repository (making dummy changes to the artifacts in ${user.home}/.m2/repository indicates they aren't being pulled into the test repo). Once the repo has been setup, the tests run in a matter of seconds.
Having each test take 6 minutes to run isn't viable for local development, the testing iterations are too long. Is it possible to configure the maven-it-extension to pull dependencies from the local repo when building the test repos? I've tried a few combinations of <localRepository> and <repository>file://C:/etc</repository> tags in ${user.home}/.m2/repository/settings.xml, but this hasn't worked. I'm able to copy a populated test repo across in the filesystem in ~20sec, so I think this would make development viable again.
Beta Was this translation helpful? Give feedback.
All reactions