in core-it-support/core-it-plugins/maven-it-plugin-singleton-component/src/main/java/org/apache/maven/plugin/coreit/ItMojo.java [80:109]
public void execute() throws MojoExecutionException {
TestComponent componentFromMap =
(TestComponent) componentMap.values().iterator().next();
TestComponent componentFromList =
(TestComponent) componentList.iterator().next();
getLog().info("[MAVEN-CORE-IT-LOG] Using component: " + componentWithoutRoleHint);
getLog().info("[MAVEN-CORE-IT-LOG] Using component: " + componentWithRoleHint);
getLog().info("[MAVEN-CORE-IT-LOG] Using component: " + componentFromMap);
getLog().info("[MAVEN-CORE-IT-LOG] Using component: " + componentFromList);
Properties props = new Properties();
props.setProperty("id.0", componentWithoutRoleHint.getId());
props.setProperty("id.1", componentWithRoleHint.getId());
props.setProperty("id.2", componentFromMap.getId());
props.setProperty("id.3", componentFromList.getId());
getLog().info("[MAVEN-CORE-IT-LOG] Creating output file: " + outputFile);
try {
outputFile.getParentFile().mkdirs();
try (FileOutputStream os = new FileOutputStream(outputFile)) {
props.store(os, "MAVEN-CORE-IT-LOG");
}
} catch (IOException e) {
throw new MojoExecutionException("Output file could not be created: " + outputFile, e);
}
getLog().info("[MAVEN-CORE-IT-LOG] Created output file: " + outputFile);
}