Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #17 from netceler/master
Browse files Browse the repository at this point in the history
Javadoc & debug
  • Loading branch information
bguerin authored Jan 3, 2017
2 parents f6e5b5a + db9c5c7 commit b63fc08
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* @author Romain Linsolas
* @author Benoit Guerin
* @since 09/04/13
* @since 1.0.0
*/
public abstract class AbstractCasperJSRunnerMojo extends AbstractMojo {

Expand Down Expand Up @@ -250,12 +250,16 @@ public abstract class AbstractCasperJSRunnerMojo extends AbstractMojo {

/**
* The directory where output files will be stored
*
* @since 1.0.0
*/
@Parameter(defaultValue = "${project.build.directory}/casperjs")
private File targetDir;

/**
* The current maven session, used by the ToolChainManager
*
* @since 1.0.0
*/
@Parameter(defaultValue = "${session}")
private MavenSession session;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,23 @@ public Collection<String> findScripts() {
if (specific != null && !specific.isEmpty()) {
final List<String> temp = new ArrayList<String>();
if (specific.endsWith(".js") || specific.endsWith(".coffee")) {
getLogger().debug("matching \"**/" + specific + "\"");
temp.add("**/" + specific);
} else {
getLogger().debug("matching \"**/" + specific + ".js\"");
temp.add("**/" + specific + ".js");
getLogger().debug("or matching \"**/" + specific + ".coffee\"");
temp.add("**/" + specific + ".coffee");
}
scanner.setIncludes(temp.toArray(new String[temp.size()]));
} else {
for (final String include : includes) {
getLogger().debug("matching \"**/" + include + "\"");
}
for (final String exclude : excludes) {
getLogger().debug("not matching \"**/" + exclude + "\"");
}

scanner.setIncludes(includes.toArray(new String[includes.size()]));
scanner.setExcludes(excludes.toArray(new String[excludes.size()]));
}
Expand All @@ -57,6 +67,10 @@ public Collection<String> findScripts() {
final List<String> result = asList(scanner.getIncludedFiles());
if (result.isEmpty()) {
getLogger().warn("No files found in directory " + baseDir + " matching criterias");
} else {
for (final String r : result) {
getLogger().debug("found \"" + r + "\"");
}
}

return result;
Expand Down

0 comments on commit b63fc08

Please sign in to comment.