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 task: Maven wrapper support #9242
Comments
Adding @zjrunner and @alexmullans for consideration. |
Hey @ahaeber, we don't have any plans to add support for the Maven wrapper in the Maven task. If you want to use the Maven wrapper, you can set up a build script to install it and run all the Maven commands that the Maven task is running for your build. Alternatively, you can create a Maven wrapper extension that would do as you described to allow a custom maven executable. For info on creating an extension, see: https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=vsts |
@joshmgross creating a separate build extension for this seems like a lot of work because I will then have to keep it aligned with the standard Maven task. Would you consider a PR by me to add this functionality? I believe it will mainly be some changes at https://github.com/Microsoft/azure-pipelines-tasks/blob/master/Tasks/MavenV3/maventask.ts#L47 |
@ahaeber We try to keep the tasks as light as possible to make them maintainable and since this is a 3rd party maven tool we won't add it to the task. A separate build extension is definitely a lot of extra work. I'd recommend writing a script to install maven wrapper and call the maven commands to run your build. |
The Maven wrapper is now an official part of Maven 3 ( see https://maven.apache.org/wrapper/ ). The Also, regardless of whether a project includes a wrapper script generated by the official Maven plugin or the Takari plugin, the wrapper script by definition must act identically to the default Maven command. |
I did manage to bypass it with a symbolic link + temp path : ln -s ../../mvnw mvn
|
seconding this, the maven wrapper should be considered a part of maven, just like the gradle wrapper is a part of gradle and i would expect my CICD tools to support what other tools have been able to. |
Please reconsider, a lot of things changed. The wrapper is now a part of maven. |
@joshmgross any chance for this to be reconsidered as Wrapper is now a part of maven? |
Apache Flink is using maven wrapper now, as more and more open-source projects use maven wrapper, could your reconsider to add wrapper support to maven task? |
Currently it does not seem possible to use the Maven wrapper (see https://github.com/takari/maven-wrapper) with the Maven task. The Maven task has various ways for configuring the path, but at the end it is hardcoded to use 'mvn' as the executable name. Usually the Maven wrapper is named 'mvnw'.
A way to simply specify the Maven path + command name would be helpful. Actually that will be the same as mvnExec that is created now. Could introduce a new variable in task.json named "mvnExec" which is mutually exclusive to mavenPath, mavenSetM2Home and mavenVersionSelection. If "mvnExec" is specificed then simply use that.
The text was updated successfully, but these errors were encountered: