Package de.oktoflow.platform.cmdTools
Class DetermineRemoteRepositories
java.lang.Object
de.oktoflow.platform.cmdTools.DetermineRemoteRepositories
Determines the used remote Maven repositories. If multiple were used for download, prefer "central".
- Author:
- Holger Eichelberger, SSE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEffectiveDependencies(String[] args) Executes 'mvn dependency:list' using ProcessBuilder.static voidThe main program.private static StringresolveOriginFromLocalFiles(String coords, String localRepoBase) Navigates the .m2 folder structure and parses repository metadata files.
-
Constructor Details
-
DetermineRemoteRepositories
public DetermineRemoteRepositories()
-
-
Method Details
-
main
The main program.- Parameters:
args- the command line arguments, may be optional Maven arguments (such as-o, the last one optional the POM file to analyze (elsepom.xml)
-
getEffectiveDependencies
private static List<String> getEffectiveDependencies(String[] args) throws IOException, InterruptedException Executes 'mvn dependency:list' using ProcessBuilder. Parses the output to find unique G:A:V:S coordinates.- Parameters:
args- the command line arguments, may be optional Maven arguments (such as-o, the last one optional the POM file to analyze (elsepom.xml)- Throws:
IOExceptionInterruptedException
-
resolveOriginFromLocalFiles
Navigates the .m2 folder structure and parses repository metadata files.- Parameters:
coords- the maven coordinateslocalRepoBase- the base directory of the local repository
-