I just want to run a "java -cp xxxx foo.java" with xxx being filled
portably accross machines.
Using maven gav is a great and common way to solve it.
JBang uses //DEPS to do that but as some pitfalls as an ecosystem, stack,
packaging and defaults.
My idea was to make maven able to use its resolver part to fill xxxx and
run the command (can be exec plugin under the hood while use just writes
"mvn foo.java" somehow.

Technically this is debatable a lot since it can end in almost any plugin
related to exec (scripting, exec, servicetool, groovy, kotlin, ...) but
there the goal is to provide a default official way (therefore my proposal
to make it to core else it will fail like the dozen of other attempts IMHO).

Long story short it is a way to make java usable directly without setting
up a full stack for CI/automotion.
Implicit compilation by java binary is great but without classpath support
it is hard and I don't see maven being supported as maven in the JDK so it
must stay with where maven-resolver is so maven sounds like the best
natural home and best way to promote this feature to get portable editor
support.

Hope it is clearer.

Romain Manni-Bucau
@rmannibucau <https://x.com/rmannibucau> | .NET Blog
<https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/> | Old
Blog <http://rmannibucau.wordpress.com> | Github
<https://github.com/rmannibucau> | LinkedIn
<https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064>
Javaccino founder (Java/.NET service - contact via linkedin)


Le dim. 21 déc. 2025 à 20:07, Elliotte Rusty Harold <[email protected]> a
écrit :

> On Sun, Dec 21, 2025 at 6:42 PM Romain Manni-Bucau
> <[email protected]> wrote:
> >
> > Can be but ultimately maven owns the dependencies resolution so it is the
> > only valuable place to do it since maven is built on java, not the
> > opposite, no?
> >
>
> Not necessarily, no. Perhaps a more detailed explanation of what
> you're trying to do might help. So far it's not fully obvious what
> you're proposing or what problem this solves.
>
> --
> Elliotte Rusty Harold
> [email protected]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to