-
Notifications
You must be signed in to change notification settings - Fork 56
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 plugin uses incorrect repository and causes CI/CD build failure. #2626
Comments
I used to run into the same problem and fixed it putting the command line arguments ( |
Thanks, that kind of works, but in jenkins pipeline we are using Update: In the end I had to change the |
Work around: The hilla wrapper use ./mvnw when running MavenWrapperMain -q vaadin:configure. The wrapper does not support MAVEN_ARGS (tried 3.9.9 too), but an undocumented MAVEN_CONFIG. See: https://issues.apache.org/jira/projects/MWRAPPER/issues/MWRAPPER-110?filter=allopenissues. The important setting for me is -s settings.xml with auth info:
CommandRunner.java skips parameters on executeCommand for vaadin:configure |
Describe the bug
In Jenkins builds we have explicitly specified maven repository path via
-Dmaven.repo.local=../mvnRepository
mvn parameter, so each pipeline has its own local maven repo. If vaadin maven plugin determines that hilla is in project, it will runmvn vaadin:configure
command in separate child process, but it doesn't pass the path to local maven repository so it will use the default ~/.m2 folder and fail because it will not find the locally built dependencies there which were installed in the local repo by the pipeline build.To further make this a bigger problem, vaadin plugin calls
com.vaadin.hilla.internal.AbstractTaskEndpointGenerator#prepareEngineConfiguration
which doesn't even read the error output stream from the child processes it spawns so there is no direct way of knowing why the child process is failing on CI/CD while working fine locally without some time consuming investigation.Expected-behavior
If vaadin maven plugin runs any child processes with maven commands, it should pass all relevant configuration parameters so they works with same settings as the parent build process and doesn't cause the whole build to fail.
If there is any error in child processes the plugin should read at least the error stream of the child process and write it to build output so the use able to determine what is wrong.
Reproduction
mvn vaadin:configure
during maven build.mvn -Dmaven.repo.local=./mvnRepository clean install
System Info
MacOS 14.5, Vaadin 24.4.3
The text was updated successfully, but these errors were encountered: