Run ant task in different jvm

前端 未结 3 1669
北恋
北恋 2020-12-15 12:23

Our ant build is run using Java 1.7.0 for JAVA_HOME. This way javac and all other Java dependent targets use the correct Java by default.

But 1 ant target from an ex

3条回答
  •  误落风尘
    2020-12-15 13:01

    You can use the exec task to run the build file with that target defined to run as a parameter. It could be running in a different JVM since you can pass the JVM to that exec call.

    Note that you'd have to refactor the target to rely on files for communication rather than setting properties. Since it would be in a different JVM, it obviously can't rely on memory.

提交回复
热议问题