I have setup a project that deploys to a Wildfly AS fine using Maven
wildfly:deploy
I was looking to implement calling Maven3 from Java using this but by including the dependency
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-embedder</artifactId>
<version>3.1.1</version>
</dependency>
the deploy phase fails. Why is this happening and is there a solution?