Package io.codemodder.plugins.maven
Class MavenProvider
java.lang.Object
io.codemodder.plugins.maven.MavenProvider
- All Implemented Interfaces:
io.codemodder.ProjectProvider
Provides Maven dependency management functions to codemods.
Current Limitations are:
a. We skip parent finding if there's not a relativePath declaration (this is by design), so sometimes pom finding will fail on purpose b. there are several flags on ProjectModelFactory which aren't applied. They relate to verisons, upgrading and particularly: Actives Profiles c. If you need anything declared in a ~/.m2/settings.xml, we don't support that (e.g., passwords or proxies) d. Haven't tested, but I'm almost sure that it wouldn't work on any repo other than central e. We allow on this module to do online resolution. HOWEVER by default its offline f. You need to set an `M2_REPO` environment variable and/or property or declare withRepositoryPath to somewhere writable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<io.codemodder.DependencyGAV>
getAllDependencies
(Path projectDir, Path file) io.codemodder.DependencyUpdateResult
updateDependencies
(Path projectDir, Path file, List<io.codemodder.DependencyGAV> dependencies)
-
Constructor Details
-
MavenProvider
public MavenProvider()
-
-
Method Details
-
updateDependencies
public io.codemodder.DependencyUpdateResult updateDependencies(Path projectDir, Path file, List<io.codemodder.DependencyGAV> dependencies) - Specified by:
updateDependencies
in interfaceio.codemodder.ProjectProvider
-
getAllDependencies
- Specified by:
getAllDependencies
in interfaceio.codemodder.ProjectProvider
-