You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some tools expose an alternate entrypoint method (not main()) for in-process calls. exec-maven-plugin having the ability to call any public static method taking a single String[] argument would be very nice in these situations, providing considerable additional versatility for very small cost in complexity.
As an example, the wsimport tool from jax-ws (https://github.com/eclipse-ee4j/metro-jax-ws/blob/master/jaxws-ri/tools/wscompile/src/main/java/com/sun/tools/ws/WsImport.java) has its main() forcefully terminating the process, making it unsuitable for in-process maven execution. But the WsImport class also exposes a public static int doMain(String[] args) which is explicitly documents as a being an "Entry point for tool integration". Being able to call this method instead of main() would make it possible to generate java code from wsdl in-process, speeding up builds considerably as repeatedly forking the wsimport process incurs sizeable performance overhead.
If you find this addition as valuable as I do, I could submit a PR that would add class and method optional plugin configuration parameters to the java goal. Specifying any of those parameters would override the current behavior of the mainClassparameter, preserving backward compatibility.
All comments and opinions gladly welcomed!
The text was updated successfully, but these errors were encountered:
Some tools expose an alternate entrypoint method (not
main()
) for in-process calls.exec-maven-plugin
having the ability to call any public static method taking a singleString[]
argument would be very nice in these situations, providing considerable additional versatility for very small cost in complexity.As an example, the
wsimport
tool fromjax-ws
(https://github.com/eclipse-ee4j/metro-jax-ws/blob/master/jaxws-ri/tools/wscompile/src/main/java/com/sun/tools/ws/WsImport.java) has itsmain()
forcefully terminating the process, making it unsuitable for in-process maven execution. But theWsImport
class also exposes apublic static int doMain(String[] args)
which is explicitly documents as a being an "Entry point for tool integration". Being able to call this method instead of main() would make it possible to generate java code fromwsdl
in-process, speeding up builds considerably as repeatedly forking thewsimport
process incurs sizeable performance overhead.If you find this addition as valuable as I do, I could submit a PR that would add
class
andmethod
optional plugin configuration parameters to thejava
goal. Specifying any of those parameters would override the current behavior of themainClass
parameter, preserving backward compatibility.All comments and opinions gladly welcomed!
The text was updated successfully, but these errors were encountered: