public class EmbeddedMaven extends Object
| Constructor and Description |
|---|
EmbeddedMaven() |
| Modifier and Type | Method and Description |
|---|---|
static PomEquippedEmbeddedMaven |
forProject(File pomFile)
Specifies a POM file the EmbeddedMaven should be used for.
|
static PomEquippedEmbeddedMaven |
forProject(String pomFile)
Specifies a POM file the EmbeddedMaven should be used for.
|
static MavenInvokerEquippedEmbeddedMaven |
withMavenInvokerSet(org.apache.maven.shared.invoker.InvocationRequest request,
org.apache.maven.shared.invoker.Invoker invoker)
Specifies an
InvocationRequest and an Invoker the EmbeddedMaven should be used with. |
public static PomEquippedEmbeddedMaven forProject(File pomFile)
This method offers you to use a Resolver EmbeddedMaven API for additional easy setting of Maven Invoker that is internally used.
If you prefer more powerful approach that is less comfortable and more boilerplate, then use the method
withMavenInvokerSet(InvocationRequest, Invoker)
pomFile - POM file the EmbeddedMaven should be used forpublic static PomEquippedEmbeddedMaven forProject(String pomFile)
This method offers you to use a Resolver EmbeddedMaven API for additional easy setting of Maven Invoker that is internally used.
If you prefer more powerful approach that is less comfortable and more boilerplate, then use the method
withMavenInvokerSet(InvocationRequest, Invoker)
pomFile - POM file the EmbeddedMaven should be used forpublic static MavenInvokerEquippedEmbeddedMaven withMavenInvokerSet(org.apache.maven.shared.invoker.InvocationRequest request, org.apache.maven.shared.invoker.Invoker invoker)
InvocationRequest and an Invoker the EmbeddedMaven should be used with.
When you use this approach, it is expected that both instances are properly set by you and no additional parameters (such as -DskipTests) is added by Resolver. You can also observe some limited functionality provided by Resolver API.
If you prefer more comfortable and less boilerplate approach, then use the method forProject(String)
request - An InvocationRequest the EmbeddedMaven should be used withinvoker - An Invoker the EmbeddedMaven should be used withCopyright © 2016 JBoss by Red Hat. All rights reserved.