danielflower / multi-module-maven-release-plugin

A maven release plugin that is fast, does not add extra commits, and works well with single or multiple modules
http://danielflower.github.io/multi-module-maven-release-plugin/index.html
MIT License
125 stars 64 forks source link

Use Maven Wrapper #120

Open mtivi opened 2 years ago

mtivi commented 2 years ago

Tests depend on M2_HOME which has been unsupported since 3.5.0.

Rather than depending on unsupported environment variables, and external maven installations, use the maven wrapper this repository.

kobynet commented 2 years ago

@danielflower I think this plugin should move to version 4.0.0 and have some breaking changes like dropping older maven dependency. As part of moving forward, i believe Maven Wrapper is a good choice, no need to be bound to local maven copy, this has also big advantage when choosing container image to build (only jdk needed no maven+jdk).

danielflower commented 2 years ago

Hi, so dropping requirement for M2_HOME seems fine to me. I was reading https://issues.apache.org/jira/browse/MNG-5607 and lots of comments there say "just use whatever is on the path" and that makes sense to me. Happy to do that.

I'm a bit more nervous about using maven wrapper, because I don't know the downsides. For example, I presume on a build box with no proxy connection to the internet requiring maven wrapper would break things.

mtivi commented 2 years ago

I was thinking to use maven wrapper to build this project. I did not realize that usage of this plugin was dependent on an M2 environment.

Either way, I don't think Internet connectivity is big problem when using maven wrapper. The maven executable is checked into source control. If that's not an option, the maven wrapper can be configured to use a custom distribution url.

danielflower commented 2 years ago

Ok. I don't remember why M2_HOME is used in tests then. Couldn't the tests just whichever maven is on the path then? I'm fine with that if it works. There is a separate set of tests that test the plugins work on various versions of maven - that mechanism could be used for all tests too.