downloadMavenJars static method

Future<void> downloadMavenJars(
  1. List<MavenDependency> deps,
  2. String targetDir
)

Downloads JAR files of all deps transitively into targetDir.

Implementation

static Future<void> downloadMavenJars(
    List<MavenDependency> deps, String targetDir) async {
  final tempDir = await currentDir.createTemp('maven_temp_');
  await _runMavenCommand(
    deps,
    [
      'dependency:copy-dependencies',
      '-DoutputDirectory=../$targetDir',
    ],
    tempDir,
  );
  await tempDir.delete(recursive: true);
}