Registry / build-tool / maven-invoker

maven-invoker

JSON →
library3.3.0javamavenunverified

Programmatic API to invoke Maven builds from Java applications.

<dependency> <groupId>org.apache.maven.shared</groupId> <artifactId>maven-invoker</artifactId> <version>3.3.0</version> </dependency>
INSTALL
IMPORT
SIG · MAVEN-INVOKER
M
maven-invoker
build-tooljavav3.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DefaultInvoker
org.apache.maven.shared.invoker.DefaultInvoker

Invokes a Maven build programmatically with compile goal.

import org.apache.maven.shared.invoker.DefaultInvoker; import org.apache.maven.shared.invoker.InvocationRequest; import org.apache.maven.shared.invoker.Invoker; public class Example { public static void main(String[] args) throws Exception { Invoker invoker = new DefaultInvoker(); InvocationRequest request = new DefaultInvocationRequest(); request.setPomFile(new File("pom.xml")); request.setGoals(java.util.Collections.singletonList("compile")); invoker.execute(request); } }
Debug
Known issues
gotchaRequires Maven installation; uses Maven home from environment or system property.
fix
Set M2_HOME or pass invoker.setMavenHome(new File("/path/to/maven"))
affects: *
Upgrade
Version history
3.3.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
maven-invoker — mvn dependency:get maven-invoker · libregistry