-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
cli test fails without settings.xml #28090
Comments
/cc @ebullient, @maxandersen |
cc @aloubyansky |
The relevant bits: Maven wrapper is invoking maven, which complains if it can't find a .m2 settings.xml Maven does want one somewhere...https://maven.apache.org/settings.html In this environment, is it unable to create one for that user (no write access to /Users/mavenrunner/)? This sounds like something maven is trying/failing to do, not something Quarkus is attempting (we are invoking/wrapping maven in this case). |
Actually, there are multiple issues regarding settings.xml here. The first one is with this line quarkus/devtools/cli/src/test/java/io/quarkus/cli/RegistryClientBuilderTestBase.java Line 62 in 782c6ba
mavenContext.getUserSettings() will return null and the call to toPath() will cause a NullPointerException as referred to line 148 of the attached maven log.
The second problem is with the parent pom.xml which will add Line 445 in 782c6ba
The last problem is with the property cleanup, it ignores properties that were not present before and does not add them to the original properties map as null: quarkus/devtools/cli/src/test/java/io/quarkus/cli/CliDriver.java Lines 112 to 129 in 782c6ba
Maven is trying to read the settings file only because it was added to maven properties maven.settings file. And maven rightfully fails because this file is not present. To fix this issue, we should avoid adding maven settings file if it does not exist. |
Null check on mavenSettings. Do not pass non-existent maven settings file to surefire and failsafe plugin. Fix nearby typos and deprecated API usage. Fixes quarkusio#28090
Null check on mavenSettings. Do not pass non-existent maven settings file to surefire and failsafe plugin. Fix nearby typos and deprecated API usage. Fixes quarkusio#28090
Null check on mavenSettings. Do not pass non-existent maven settings file to surefire and failsafe plugin. Fix nearby typos and deprecated API usage. Use ci settings.xml full path. Fixes quarkusio#28090
Null check on mavenSettings. Do not pass non-existent maven settings file to surefire and failsafe plugin. Fix nearby typos and deprecated API usage. Use ci settings.xml full path. Fixes quarkusio#28090
Null check on mavenSettings. Do not pass non-existent maven settings file to surefire and failsafe plugin. Fix nearby typos and deprecated API usage. Use ci settings.xml full path. Fixes quarkusio#28090
Null check on mavenSettings. Do not pass non-existent maven settings file to surefire and failsafe plugin. Fix nearby typos, deprecated API usage and perform code cleanup. Use ci settings.xml full path. Fixes quarkusio#28090 Signed-off-by: Adler Fleurant <[email protected]>
Null check on mavenSettings. Do not pass non-existent maven settings file to surefire and failsafe plugin. Fix nearby typos. Use ci settings.xml full path for test that uses settings parameter. Fixes quarkusio#28090 Signed-off-by: Adler Fleurant <[email protected]>
Check if maven settings file exist if coming from system properties. Null check on mavenSettings. Fix nearby typos. Fixes quarkusio#28090 Signed-off-by: Adler Fleurant <[email protected]>
Check if maven settings file exists when getting from system properties. Null check on mavenSettings. Fix nearby typos. Fixes quarkusio#28090 Signed-off-by: Adler Fleurant <[email protected]>
Check if maven settings file exists when getting from system properties. Null check on mavenSettings. Fix nearby typos. Fixes quarkusio#28090 Signed-off-by: Adler Fleurant <[email protected]>
Check if maven settings file exists when getting from system properties. Null check on mavenSettings. Fix nearby typos. Fixes quarkusio#28090 Signed-off-by: Adler Fleurant <[email protected]> (cherry picked from commit 2b0923f)
Check if maven settings file exists when getting from system properties. Null check on mavenSettings. Fix nearby typos. Fixes quarkusio#28090 Signed-off-by: Adler Fleurant <[email protected]>
Check if maven settings file exists when getting from system properties. Null check on mavenSettings. Fix nearby typos. Fixes quarkusio#28090 Signed-off-by: Adler Fleurant <[email protected]>
Check if maven settings file exists when getting from system properties. Null check on mavenSettings. Fix nearby typos. Fixes quarkusio#28090 Signed-off-by: Adler Fleurant <[email protected]>
Check if maven settings file exists when getting from system properties. Null check on mavenSettings. Fix nearby typos. Fixes quarkusio#28090 Signed-off-by: Adler Fleurant <[email protected]>
Check if maven settings file exists when getting from system properties. Null check on mavenSettings. Fix nearby typos. Fixes quarkusio#28090 Signed-off-by: Adler Fleurant <[email protected]>
Describe the bug
If no settings.xml is present in the maven user location, cli test will fail with 3 failures and 3 errors.
./mvnw -f devtools/cli test ... [ERROR] Tests run: 79, Failures: 3, Errors: 3, Skipped: 0
Full Maven Log
Expected behavior
cli test should be able to run without settings.xml
Actual behavior
Fails without settings.xml
How to Reproduce?
Steps to reproduce the behavior:
./mvnw -f devtools/cli test
Output of
uname -a
orver
Darwin mavenrunner-mac 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64
Output of
java -version
openjdk version "17.0.2" 2022-01-18
GraalVM version (if different from Java)
No response
Quarkus version or git rev
e19f65e
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Additional information
No response
The text was updated successfully, but these errors were encountered: