downloadMavenSources static method
Downloads and unpacks source files of deps
into targetDir
.
Implementation
static Future<void> downloadMavenSources(
List<MavenDependency> deps, String targetDir) async {
final tempDir = await currentDir.createTemp('maven_temp_');
await _runMavenCommand(
deps,
[
'dependency:unpack-dependencies',
'-DexcludeTransitive=true',
'-DoutputDirectory=../$targetDir',
'-Dclassifier=sources',
],
tempDir,
);
await tempDir.delete(recursive: true);
}