Skip to content

Commit

Permalink
šŸµšŸ¶šŸ»
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsuter committed Jul 22, 2024
1 parent 75e5e75 commit cd5cf2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@

import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
Expand Down Expand Up @@ -52,8 +54,7 @@ protected void engineExec(MavenProjectBuilderProxy projectBuilder) throws Except
}

getLog().info("Compiling test sources...");
Map<String, Object> result = projectBuilder.testCompile(project.getBasedir(), getDependencyIarJars(),
getOptions());
Map<String, Object> result = projectBuilder.testCompile(project.getBasedir(), getDependencyIarJars(), getOptions());
CompilerResult.store(result, project);
}

Expand All @@ -65,8 +66,7 @@ private List<File> getDependencyIarJars() {
if (!Files.exists(iarJarClasspath)) {
return Collections.emptyList();
}
List<File> iarJars = new ClasspathJar(iarJarClasspath).getFiles();
return iarJars;
var iarJars = new ClasspathJar(iarJarClasspath).getFiles();
return iarJars.stream().map(Path::toFile).collect(Collectors.toList());
}

}
6 changes: 3 additions & 3 deletions src/main/java/ch/ivyteam/ivy/maven/util/ClasspathJar.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ private static List<String> getClassPathUris(Collection<File> classpathEntries)
.collect(Collectors.toList());
}

public List<File> getFiles() {
public List<Path> getFiles() {
String urlClasspath = getClasspathUrlEntries();
if (StringUtils.isBlank(urlClasspath)) {
return Collections.emptyList();
}

List<File> files = new ArrayList<>();
var files = new ArrayList<Path>();
for (String entry : urlClasspath.split(" ")) {
files.add(new File(uriToAbsoluteFilePath(entry)));
files.add(new File(uriToAbsoluteFilePath(entry)).toPath());
}
return files;
}
Expand Down

0 comments on commit cd5cf2e

Please sign in to comment.