I don't get every detail, but have one question on dependencies: isn't 
dependency injection to the maven-scripting-plugin sufficient [1]

do you need something more advanced, managed by the maven-scripting-plugin 
itself?

Regards,

Hervé

[1] https://maven.apache.org/plugins-archives/maven-scripting-plugin-LATEST/
configure-the-script-engine.html

Le jeudi 25 février 2021, 16:16:09 CET Romain Manni-Bucau a écrit :
> Le jeu. 25 févr. 2021 à 15:28, Markus KARG <mar...@headcrashing.eu> a
> 
> écrit :
> > Romain,
> > 
> > just to understand your target: In the end what you want is that the Java
> > scripting plugin will execute Java source code, just like jshell does?
> > That
> > sounds interesting to me.
> 
> This is more a side effect, the target is to be able to be able to replace
> src/main/java/xxxx/build/*.java + exec-maven-plugin setups which has the
> drawback to require dependencies in the actual module (even in scope
> provided).
> The scripting plugin has the opportunity to normalize that through the
> maven-java-scripting-engine which will take this through engine
> configuration.
> To illustrate the usage: it generates documentation, typed clients (http),
> jsonschema, openapi.json, docker images with CDS and much more and in a
> customized fashion.
> Big gain is to not have to leak all dependencies in the build  and keep
> build part of the build isolated (a profile can enable to code in the IDE
> but when running mvn xxx it is gone/deactivated).
> 
> Side notes:
> 1. creating a build module is not an option since it is really about having
> the build code in the related module and not a "put it all" module which is
> very hard to maintain.
> 2. creating a mojo for these needs is inefficient in terms of maintenance
> and customization level (I come from there) and ultra verbose in the pom
> compared to this scripting option
> 
> 
> Hope it clarifies my goal
> 
> > -Markus
> > 
> > 
> > -----Ursprüngliche Nachricht-----
> > Von: Romain Manni-Bucau [mailto:rmannibu...@gmail.com]
> > Gesendet: Donnerstag, 25. Februar 2021 09:59
> > An: Maven Developers List
> > Betreff: Future of maven scripting plugin, java?
> > 
> > Hi all,
> > 
> > Wonder if maven scripting plugin has some future plans or not.
> > Very concretely I'm interested in being able to use java as scripting
> > files
> > (something along src/build/scripting in terms of structure in final
> > project).
> > Since we are in maven we have javac so it is not hard to implement a
> > jsr223
> > (with tool provider or not is a detail) but more complicated thing is the
> > classpath, it needs the plugin to be able to create a classloader adjusted
> > for that kind of execution (potentially compiling the whole scripting
> > folder). In terms of impacts it means enabling to configure the script
> > engine, ie pass args from the mojo to the getScriptEngine method
> > (typically
> > kind of the same as exec maven plugin, ie scope/classpath).
> > 
> > So changes would be:
> > 
> > 1. implement a java script engine
> > 2. make the script engine instantiation more configurable
> > 
> > Do you think it is worth it or exec maven plugin is still preferred?
> > 
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://rmannibucau.metawerx.net/> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > <
> > https://www.packtpub.com/application-development/java-ee-8-high-performanc
> > e
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > For additional commands, e-mail: dev-h...@maven.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to