I have a java file that has some hard-coded path something like:
public class ReportBuilder
{
private static final String DIRECTORY = "META-INF";
private static final String REPORT_HTML = "report.html";
public static void createHTMLReport(String projectPath, String artifactName, ValidationResult result) throws MojoExecutionException {
String directoryPath = projectPath + "\\" + "META-INF";
String filePath = directoryPath + "\\" + "report.html";
}
}
Linux its creating META-INF
with a \
and that is causing the build to fail.
How can I switch this to OS independent so that when the same is run on Linux it creates META-INF
with correct path?