I want to execute Maven command from Java for development of a plugin. I tried maven-embedder
but looks like it is now not supported. Is someone aware of some other tool which can be used?
A simple invocation API : maven-invoker.
Project documentation : http://maven.apache.org/shared/maven-invoker/
Usage : http://maven.apache.org/shared/maven-invoker/usage.html
InvocationRequest request = new DefaultInvocationRequest(); request.setPomFile( new File( "/path/to/pom.xml" ) ); request.setGoals( Arrays.asList( "clean", "install" ) ); Invoker invoker = new DefaultInvoker(); invoker.execute( request );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With