jbang
jbang copied to clipboard
Allows the maven jbang plugin to inherit the project classpath (dependencies)
Is your feature request related to a problem? Please describe.
When using the jbang maven plugin, the dependencies of the project / module are ignored. The only solution requires to duplicate the dependencies in the jbang script, but you do not:
- no reactor resolution (requires everything to be "installed" first
- cannot use dependency management (the versions must be duplicated)
- can break the maven build order as why having dependencies is they are ignored
Describe the solution you'd like
Have something like:
<useMavenClasspath>true</useMavenClasspath>
which would run the script with the module classpath.
Describe alternatives you've considered
I've tried to use the maven exec plugin, which profives this feature, but has other issues.
@aalmiray wdyt? is there a well defined "maven classpath" we can pass as "--deps" to jbang exec call?
@cescoffier according to https://www.mojohaus.org/exec-maven-plugin/java-mojo.html includeProjectDependencies
seems to be the name of exec plugin. thats the behavior you are after,right?
Yes, you can use the same parameter name.