How to execute maven plugins from gradle without having maven and java installed

后端 未结 3 1013
感动是毒
感动是毒 2021-01-20 20:11

I need to execute a maven plugin on a system that does not have both maven and java installed and installing both of them on the syste

3条回答
  •  迷失自我
    2021-01-20 20:52

    Gradle is a build system. You can build anything with it, including native binaries.

    And yes, you can call Maven Plugins from Gradle, as Maven Plugins are written in Java and Gradle is based on Groovy and thus on Java.

    But both facts have nothing to do with each other.

    You can of course also use Gradle (or any other build system including manually stuffing things together) to build a distributable that includes a Java runtime environment. But then Java is, as said, shipped with your result. You cannot run Java code without having Java around, besides porting the Java code to something else like C++ that compiles to a native binary.

    Yes, you can also call Java code from native code if you do some glueing, but no, also this will not work without having Java around, because that's the way Java works.

提交回复
热议问题