Skip to content
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

Consider maven wrapper mvnw #901

Open
hohwille opened this issue Dec 17, 2024 · 0 comments
Open

Consider maven wrapper mvnw #901

hohwille opened this issue Dec 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@hohwille
Copy link
Member

As a IDEasy user, I want support that IDEasy should honor maven wrapper in case it is used so that the correct maven is used.

A code repository may use maven-wrapper (mvnw).
From IDEasy we recommend to configure your IDE via IDEasy but there may be use-cases where you might need multiple versions of maven within the same IDE project or you just use your existing IDE project to clone and test some other project using maven wrapper.
So whenever mvnw is present, it should be honored and preferred over the regular maven (mvn).

To conclude the Mvn commandlet should check if mvnw is present and if so, it should be used instead of mvn.
You also need to be aware that mvnw will typically only be present in the project root.
That means we need to traverse up the path (as long as pom.xml files are present) until we found mvnw.
If no mvnw was found, we should continue as normal calling mvn directly.
However, if we have found mvnw, we should call that instead.
We have to test if we then need to check if we can still call our maven command with an absolute path to the mvnw we found in project root inside the potential sub-directory we might be in.
See also takari/maven-wrapper#30

@hohwille hohwille added the enhancement New feature or request label Dec 17, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant