-
Notifications
You must be signed in to change notification settings - Fork 39
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
✨ Maven Validator now properly detects and reports build errors #486
Conversation
@@ -14,6 +14,8 @@ | |||
from kai.reactive_codeplanner.task_runner.compiler.maven_validator import ( | |||
AccessControlError, | |||
AnnotationError, | |||
BuildError, | |||
DependencyResolutionError, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shawn-hurley Should this be handled in the dependency resolution instead? This is the error it's detecting:
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.redhat.coolstore:monolith >--------------------
[INFO] Building coolstore-monolith 1.0.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from github: https://maven.pkg.github.com/shawn-hurley/analyzer-lsp/jakarta/jakarta.jakartaee-web-api/8.0.0/jakarta.jakartaee-web-api-8.0.0.pom
Downloading from github: https://maven.pkg.github.com/shawn-hurley/analyzer-lsp/jakarta/jakarta.jakartaee-api/8.0.0/jakarta.jakartaee-api-8.0.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.749 s
[INFO] Finished at: 2024-11-13T20:07:09-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project monolith: Could not resolve dependencies for project com.redhat.coolstore:monolith:jar:1.0.0-SNAPSHOT: Failed to collect dependencies at jakarta:jakarta.jakartaee-web-api:jar:8.0.0: Failed to read artif
act descriptor for jakarta:jakarta.jakartaee-web-api:jar:8.0.0: The following artifacts could not be resolved: jakarta:jakarta.jakartaee-web-api:pom:8.0.0 (absent): Could not transfer artifact jakarta:jakarta.jakartaee-web-api:pom:8.0.0 from/to
github (https://maven.pkg.github.com/shawn-hurley/analyzer-lsp): status code: 401, reason phrase: Unauthorized (401) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither of them seem capable of solving the issue at the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is it writing my github into the maven package? what is happening!
In all seriousness, the FQDN agent should be able to solve this with some tweaking, which may be worth looking into.
- Introduces two new error types, `BuildError` and `DependencyResolutionError`, which are now detected and parsed - Adds a catchall condition if maven exits non-zero but no errors are successfully parsed so that we have a chance at solving the issue - Restructures the maven_validator as the parsing logic was getting unwieldy - The maven task_runner no longer adds whitespace at the top of files - The dependency task_runner now properly checks the tasks it can handle - Adds tests for maven validator Signed-off-by: Fabian von Feilitzsch <[email protected]>
d8470b8
to
1df0a7e
Compare
Signed-off-by: Fabian von Feilitzsch <[email protected]>
BuildError
andDependencyResolutionError
, which are now detected and parsed