Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maven toolchains not used to set the java version #100

Open
mgazanayi opened this issue Feb 6, 2019 · 5 comments
Open

maven toolchains not used to set the java version #100

mgazanayi opened this issue Feb 6, 2019 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mgazanayi
Copy link

First of all, thanks for your work and for this great plugin.

We have multiple JDK versions installed and managed with toolchains plugin in our builds.
Unfortunately, the vertx-maven-plugin doesn't give the possibility of configuring which JDK to use.

Is there any way to do this or can you point me of helping implementing it?

Thanks in advance

@mgazanayi mgazanayi changed the title maven Toolchains not used to set the java version maven toolchains not used to set the java version Feb 6, 2019
@cescoffier
Copy link
Contributor

Do you mean to compile your sources? In this case, it reuses the maven compiler configuration.

@mgazanayi
Copy link
Author

No, it's for running my vertx app

mvn clean compile vertx:run

@cescoffier
Copy link
Contributor

ah ok.

Did you try to change JAVA_HOME?
The method that looks for the java executable is: https://github.com/reactiverse/vertx-maven-plugin/blob/master/src/main/java/io/reactiverse/vertx/maven/plugin/utils/JavaProcessExecutor.java#L209

@mgazanayi
Copy link
Author

The thing is that, we are using toolchains to have hermetic builds. And it works very well.

When I set a local Java version using jenv it works perfectly.

But the question for me was, since maven-toolchains-plugin makes the build of a project really hermetic, and every new developer have only to configure the toolchains, clone the project and that's all, I wanted to know how to. This keep the difference between every developers machine quite minimal.

@cescoffier
Copy link
Contributor

The JavaProcessExecutor class could be modified to use the toolchain configure in the tool chain plugin. Fancy a PR?

mgazanayi added a commit to mgazanayi/vertx-maven-plugin that referenced this issue Feb 11, 2019
mgazanayi added a commit to mgazanayi/vertx-maven-plugin that referenced this issue Feb 11, 2019
@tsegismont tsegismont added enhancement New feature or request help wanted Extra attention is needed labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants