Resource scriptRes = findScript(script);
Resource slcRootFile = findSlcRootFile(scriptRes);
+ if (slcRootFile == null)
+ throw new SlcException(
+ "Could not find any SLC root file, "
+ + "please configure one at the root of your scripts hierarchy.");
SlcExecution slcExecution = createSlcExecution(runtime, slcRootFile,
scriptRes, targets);
slcExecution.getAttributes().put(AntConstants.EXECATTR_ANT_FILE,
scriptRelativePath);
if (targets != null)
- slcExecution.getAttributes().put(
- AntConstants.EXECATTR_ANT_TARGETS, targets);
+ slcExecution.getAttributes().put(AntConstants.EXECATTR_ANT_TARGETS,
+ targets);
slcExecution.setStatus(SlcExecution.STATUS_SCHEDULED);
return slcExecution;
* defined by {@link #SLC_ROOT_FILE_NAME}.
*/
protected Resource findSlcRootFile(Resource currDir) {
- if (log.isDebugEnabled())
- log.debug("Look for SLC root file in " + currDir);
+ if (log.isTraceEnabled())
+ log.trace("Look for SLC root file in " + currDir);
try {
Resource slcRootFile = currDir.createRelative(SLC_ROOT_FILE_NAME);
if (slcRootFile.exists()) {
+ if (log.isDebugEnabled())
+ log.debug("Found SLC root file: " + slcRootFile);
return slcRootFile;
} else {
String currPath = currDir.getURL().getPath();