-
Notifications
You must be signed in to change notification settings - Fork 60
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
Remove Docker dependency from Maven testing #102
Comments
One important aspect of this is to make sure that the locally built artifacts are fetched from a local repository which wouldn't get polluted by Maven. In other words, we should preserve the fact that we have a local repository which contains artifacts produced by this build (the common libraries and the Maven plugin), behaving like a remote repository and not like the local m2 cache. Then we should have a local m2 cache which is pre-populated, but restorable in a state where those libraries are not found in the cache when a test starts. This should give us relative confidence that the plugin is working correctly, not perfect isolation but not having the Docker overhead. |
This commit reworks functional testing of the Maven plugin by executing Maven in a sandbox, isolated "as much as possible". We cannot, unfortunately, make sure that it's fully isolated but the following steps were taken: - the libraries published by this repository are published in the "common" repository - the external dependencies required for functional testing are seeded into another, shared repository - when tests are executed, a local repository is set so that dependencies are copied into that repository rather than using the local m2 repository This should make functional testing faster and fix the problem that the Maven plugin couldn't be tested on something else than Linux. Fixes graalvm#102
This commit reworks functional testing of the Maven plugin by executing Maven in a sandbox, isolated "as much as possible". We cannot, unfortunately, make sure that it's fully isolated but the following steps were taken: - the libraries published by this repository are published in the "common" repository - the external dependencies required for functional testing are seeded into another, shared repository - when tests are executed, a local repository is set so that dependencies are copied into that repository rather than using the local m2 repository This should make functional testing faster and fix the problem that the Maven plugin couldn't be tested on something else than Linux. Fixes #102
This commit reworks functional testing of the Maven plugin by executing Maven in a sandbox, isolated "as much as possible". We cannot, unfortunately, make sure that it's fully isolated but the following steps were taken: - the libraries published by this repository are published in the "common" repository - the external dependencies required for functional testing are seeded into another, shared repository - when tests are executed, a local repository is set so that dependencies are copied into that repository rather than using the local m2 repository This should make functional testing faster and fix the problem that the Maven plugin couldn't be tested on something else than Linux. Fixes #102
ATM we are using Docker to create layered images in order to have a reproducible builds for testing the Maven plugin.
See the rationale behind this decision here, and related discussion here.
This is creating an overhead by fetching an entire docker image with a duplicate GraalVM installation, a loads of additional logic related to Gradle <-> Docker interaction, but the biggest problem is that it limits Maven testing to Linux (since guest Docker image will always be Linux based).
I propose that whole Docker related part gets removed and replaced with Groovy / Kotlin logic which would invoke
mvnw
to download separate maven installation, customsettings.xml
and environment variables which would change.m2
location, and a "folder-juggling" mechanism to simulate repository caching between each run.I'll work on PoC for this and link it to this issue as soon as it's ready.
The text was updated successfully, but these errors were encountered: