Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
[JENKINS-10820] Improved logging if there are no files found (m2).
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Oct 4, 2011
1 parent 7779887 commit 74c7dc9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/hudson/plugins/analysis/core/FilesParser.java
Expand Up @@ -212,8 +212,13 @@ public ParserResult invoke(final File workspace, final VirtualChannel channel) t
try {
String[] fileNames = new FileFinder(filePattern).find(workspace);

if (fileNames.length == 0 && !isMavenBuild) {
result.addErrorMessage(Messages.FilesParser_Error_NoFiles());
if (fileNames.length == 0) {
if (isMavenBuild) {
log("No files found in " + workspace.getAbsolutePath() + " for pattern: " + filePattern);
}
else {
result.addErrorMessage(Messages.FilesParser_Error_NoFiles());
}
}
else {
parseFiles(workspace, fileNames, result);
Expand Down

0 comments on commit 74c7dc9

Please sign in to comment.