/**
* Add the default classes directory to classpath
*/
private void addDefaultClassesDirToClasspath(RebelMainModel model, RebelClasspathResource defaultClasspath) {
// project output directory
RebelClasspathResource classpathResource = new RebelClasspathResource();
String fixedDefaultClassesDirectory = fixFilePath(defaultClassesDirectory);
log.info("fixed default classes directory : " + fixedDefaultClassesDirectory);
classpathResource.setDirectory(fixedDefaultClassesDirectory);
// XXX sure about this? what if i specified an absolute path with a placeholder in it?? this wouldn't work if i do this check!
if (!new File(fixedDefaultClassesDirectory).isDirectory()) {
log.info("Not adding default classes directory as it doesn't exist or is not a directory");
return;
}
if (defaultClasspath != null) {
classpathResource.setIncludes(defaultClasspath.getIncludes());
classpathResource.setExcludes(defaultClasspath.getExcludes());
}
model.addClasspathDir(classpathResource);
}