You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Philip <ph...@protonmail.com.INVALID> on 2025/04/09 16:01:42 UTC

Automatic Toolchain provisioning using Maven Toolchains

Hello people,

I have been trying out the maven toolchains plugin and wanted to see if it was possible to automatically download JDKs fitting the configured properties in my pom.xml.
Gradle's foojay-resolver plugin already does this using the Foojay Disco API (https://github.com/gradle/foojay-toolchains).

What do you think about this idea?

Philip

Re: Automatic Toolchain provisioning using Maven Toolchains

Posted by Philip <ph...@protonmail.com.INVALID>.
I was unaware that plugin existed, but sadly it doesn't seem to be actively maintained.

I hope one day this kind of functionality finds its way into the official maven toolchains plugin.



On Monday, April 14th, 2025 at 09:07, Benjamin Marwell <bm...@apache.org> wrote:

> Yes, and other plugins did this as well, eg:
> https://github.com/linux-china/toolchains-maven-plugin
> 
> However, as much as I love this idea, they lack one problem:
> They often don't work in corporate environments (or so I heard). In some
> envs it's enough to specify a proxy, some corps have their own JDKs hosted
> somewhere (eg Nexus/Artifactory, or just plain http) etc.
> 
> Additionally, some corporate environments prevent execution of binaries not
> downloaded to specific folders and/or not installed by an admin.
> 
> It would be great to have a solution which covers all cases. Especially if
> someone wants to contribute to a project using such tools from their
> corporate environment.
> 
> 
> 
> On Mon, 14 Apr 2025, 01:15 Greg Chabala, greg.chabala@gmail.com wrote:
> 
> > I think your idea has merit. Some other tools can provision JDKs (JBang,
> > SDKMAN) but more ideas and competition in the space could help.
> > 
> > I think the automatic discovery by the toolchains plugin itself without an
> > explicit toolchains.xml file still has some rough edges as well.
> > 
> > On Wed, Apr 9, 2025 at 11:03 AM Philip <philip.picej@protonmail.com
> > .invalid>
> > wrote:
> > 
> > > Hello people,
> > > 
> > > I have been trying out the maven toolchains plugin and wanted to see if
> > > it
> > > was possible to automatically download JDKs fitting the configured
> > > properties in my pom.xml.
> > > Gradle's foojay-resolver plugin already does this using the Foojay Disco
> > > API (https://github.com/gradle/foojay-toolchains).
> > > 
> > > What do you think about this idea?
> > > 
> > > Philip

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Automatic Toolchain provisioning using Maven Toolchains

Posted by Benjamin Marwell <bm...@apache.org>.
Yes, and other plugins did this as well, eg:
https://github.com/linux-china/toolchains-maven-plugin

However, as much as I love this idea, they lack one problem:
They often don't work in corporate environments (or so I heard). In some
envs it's enough to specify a proxy, some corps have their own JDKs hosted
somewhere (eg Nexus/Artifactory, or just plain http) etc.

Additionally, some corporate environments prevent execution of binaries not
downloaded to specific folders and/or not installed by an admin.

It would be great to have a solution which covers all cases. Especially if
someone wants to contribute to a project using such tools from their
corporate environment.



On Mon, 14 Apr 2025, 01:15 Greg Chabala, <gr...@gmail.com> wrote:

> I think your idea has merit. Some other tools can provision JDKs (JBang,
> SDKMAN) but more ideas and competition in the space could help.
>
> I think the automatic discovery by the toolchains plugin itself without an
> explicit toolchains.xml file still has some rough edges as well.
>
> On Wed, Apr 9, 2025 at 11:03 AM Philip <philip.picej@protonmail.com
> .invalid>
> wrote:
>
> > Hello people,
> >
> > I have been trying out the maven toolchains plugin and wanted to see if
> it
> > was possible to automatically download JDKs fitting the configured
> > properties in my pom.xml.
> > Gradle's foojay-resolver plugin already does this using the Foojay Disco
> > API (https://github.com/gradle/foojay-toolchains).
> >
> > What do you think about this idea?
> >
> > Philip
>

Re: Automatic Toolchain provisioning using Maven Toolchains

Posted by Greg Chabala <gr...@gmail.com>.
Fewer NullPointerExceptions ;) . I opened this issue some time ago:
https://issues.apache.org/jira/browse/MTOOLCHAINS-53

If I find the time, I may submit a patch myself.

On Wed, Apr 16, 2025 at 3:11 AM Guillaume Nodet <gn...@apache.org> wrote:

> Le lun. 14 avr. 2025 à 00:15, Greg Chabala <gr...@gmail.com> a
> écrit :
>
> > I think your idea has merit. Some other tools can provision JDKs (JBang,
> > SDKMAN) but more ideas and competition in the space could help.
> >
> > I think the automatic discovery by the toolchains plugin itself without
> an
> > explicit toolchains.xml file still has some rough edges as well.
> >
>
> Suggestions are definitely welcomed !
>
>
> >
> > On Wed, Apr 9, 2025 at 11:03 AM Philip <philip.picej@protonmail.com
> > .invalid>
> > wrote:
> >
> > > Hello people,
> > >
> > > I have been trying out the maven toolchains plugin and wanted to see if
> > it
> > > was possible to automatically download JDKs fitting the configured
> > > properties in my pom.xml.
> > > Gradle's foojay-resolver plugin already does this using the Foojay
> Disco
> > > API (https://github.com/gradle/foojay-toolchains).
> > >
> > > What do you think about this idea?
> > >
> > > Philip
> >
>
>
> --
> ------------------------
> Guillaume Nodet
>

Re: Automatic Toolchain provisioning using Maven Toolchains

Posted by Guillaume Nodet <gn...@apache.org>.
Le lun. 14 avr. 2025 à 00:15, Greg Chabala <gr...@gmail.com> a
écrit :

> I think your idea has merit. Some other tools can provision JDKs (JBang,
> SDKMAN) but more ideas and competition in the space could help.
>
> I think the automatic discovery by the toolchains plugin itself without an
> explicit toolchains.xml file still has some rough edges as well.
>

Suggestions are definitely welcomed !


>
> On Wed, Apr 9, 2025 at 11:03 AM Philip <philip.picej@protonmail.com
> .invalid>
> wrote:
>
> > Hello people,
> >
> > I have been trying out the maven toolchains plugin and wanted to see if
> it
> > was possible to automatically download JDKs fitting the configured
> > properties in my pom.xml.
> > Gradle's foojay-resolver plugin already does this using the Foojay Disco
> > API (https://github.com/gradle/foojay-toolchains).
> >
> > What do you think about this idea?
> >
> > Philip
>


-- 
------------------------
Guillaume Nodet

Re: Automatic Toolchain provisioning using Maven Toolchains

Posted by Greg Chabala <gr...@gmail.com>.
I think your idea has merit. Some other tools can provision JDKs (JBang,
SDKMAN) but more ideas and competition in the space could help.

I think the automatic discovery by the toolchains plugin itself without an
explicit toolchains.xml file still has some rough edges as well.

On Wed, Apr 9, 2025 at 11:03 AM Philip <ph...@protonmail.com.invalid>
wrote:

> Hello people,
>
> I have been trying out the maven toolchains plugin and wanted to see if it
> was possible to automatically download JDKs fitting the configured
> properties in my pom.xml.
> Gradle's foojay-resolver plugin already does this using the Foojay Disco
> API (https://github.com/gradle/foojay-toolchains).
>
> What do you think about this idea?
>
> Philip