Expand description
Maven classpath resolution.
Resolves classpath JARs from Maven projects via mvn dependency:build-classpath
with fallback to pom.xml parsing when Maven is unavailable.
§Strategy
- Execute
mvn dependency:build-classpath -DincludeScope=compile -Dmdep.outputFile=<temp> - Parse the output file for JAR paths (colon-separated on Unix, semicolon on Windows)
- On failure/timeout, fall back to pom.xml direct parsing (lossy)
§Multi-module
Detects child POMs via the <modules> element in the root pom.xml and
resolves each module independently.
Structs§
- PomDependency
- A dependency extracted from pom.xml via simple parsing.
Functions§
- construct_
maven_ jar_ path - Construct the expected JAR path in the Maven local repository.
- detect_
modules - Detect child modules from a pom.xml’s
<modules>element. - extract_
coordinates_ from_ repo_ path - Extract Maven coordinates (
groupId:artifactId:version) from a path within the Maven local repository. - parse_
classpath_ string - Parse a classpath string (colon-separated on Unix, semicolon on Windows)
into
ClasspathEntryinstances. - parse_
pom_ dependencies - Parse dependencies from a pom.xml file using simple string matching.
- resolve_
maven_ classpath - Resolve classpath for a Maven project.