Reputation: 1068
My idea is to include some sort of Maven with the project, such that can be set up in a script like so:
I am aware of: https://dzone.com/articles/embedding-maven but it gets confusing when he talks about configuring the portable maven into the pom.xml - wait, how is that pom.xml going to mean anything if maven is not configured yet? (PS: I mean no disrespect to the author. I probably got it all wrong)
Upvotes: 0
Views: 1318
Reputation: 607
Maven Wrapper
aims to do just that, similar to the gradle wrapper seen in many gradle projects.
Running the wrapper
goal of the maven wrapper plugin will generate a mvnw
script in your project that can be run in place of a globally installed mvn
command.
It's part of the maven 3.7.0 release, and documented more fully here: https://maven.apache.org/plugins/maven-wrapper-plugin/index.html
See https://github.com/takari/maven-wrapper for maven < 3.7.0
Upvotes: 1
Reputation: 1093
One could include a shell script that would setup maven if it is not already present.
The same for building and packaging encapsulating the complexities of the setup to just runing a couple of scripts.
Upvotes: 1