in core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/ResolveTransitiveMojo.java [102:132]
public void execute() throws MojoExecutionException {
getLog().info("[MAVEN-CORE-IT-LOG] Resolving artifacts");
ResolverThread thread = new ResolverThread();
thread.start();
while (thread.isAlive()) {
try {
thread.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
if (thread.error != null) {
throw new MojoExecutionException("Failed to resolve artifacts: " + thread.error.getMessage(), thread.error);
}
if (propertiesFile != null) {
getLog().info("[MAVEN-CORE-IT-LOG] Creating properties file " + propertiesFile);
try {
propertiesFile.getParentFile().mkdirs();
try (FileOutputStream fos = new FileOutputStream(propertiesFile)) {
thread.props.store(fos, "MAVEN-CORE-IT");
}
} catch (IOException e) {
throw new MojoExecutionException("Failed to create properties file: " + e.getMessage(), e);
}
}
}