Skip to content

Commit

Permalink
#3156 = formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
coiouhkc committed Jun 17, 2023
1 parent 7768eb2 commit 20158f3
Showing 1 changed file with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,34 +164,34 @@ private File downloadWrapperAndMarkToDelete(String wrapperUrl) throws IOExceptio
}

private File downloadMavenArtifact(final ResolvedGroupArtifactVersion rgav, String type) throws IOException {
final MavenArtifactCache cache = new LocalMavenArtifactCache(Files.createTempDirectory("repository"));
//final MavenSettings settings = new MavenSettings();
final MavenArtifactDownloader downloader = new MavenArtifactDownloader(cache, null, Throwable::printStackTrace);
final ResolvedDependency rd = new ResolvedDependency(
MavenRepository.MAVEN_CENTRAL,
rgav,
new Dependency(
null,
null,
type,
null,
Collections.emptyList(),
null
),
Collections.emptyList(),
Collections.emptyList(),
null,
null,
false,
1,
Collections.emptyList()

);

return Optional
.ofNullable(downloader.downloadArtifact(rd))
.map(Path::toFile)
.orElseThrow(() -> new RuntimeException("Could not download artifact " + rd.toString()));
final MavenArtifactCache cache = new LocalMavenArtifactCache(Files.createTempDirectory("repository"));
//final MavenSettings settings = new MavenSettings();
final MavenArtifactDownloader downloader = new MavenArtifactDownloader(cache, null, Throwable::printStackTrace);
final ResolvedDependency rd = new ResolvedDependency(
MavenRepository.MAVEN_CENTRAL,
rgav,
new Dependency(
null,
null,
type,
null,
Collections.emptyList(),
null
),
Collections.emptyList(),
Collections.emptyList(),
null,
null,
false,
1,
Collections.emptyList()

);

return Optional
.ofNullable(downloader.downloadArtifact(rd))
.map(Path::toFile)
.orElseThrow(() -> new RuntimeException("Could not download artifact " + rd.toString()));
}

private Properties addPropertyToProperties(Properties mavenWrapperProperties, String name, String value) {
Expand Down

0 comments on commit 20158f3

Please sign in to comment.