Commits

Matthias Nüßler committed 73a3850

Fix typos, minor changes.

Comments (0)

Files changed (3)

src/it/site/verify.groovy

     ].collect { new File(reportDir, it) }
 
 resourceFiles.each { file ->
-    assertTrue("File '$file' does not exits", file.exists())
+    assertTrue("File '$file' does not exist", file.exists())
     assertThat("File '$file' is empty", file.length(), greaterThan(0L))
 }
 

src/main/java/org/nuessler/maven/plugin/cakupan/CakupanInstrumentMojo.java

         if (!instrumentDestDir.exists()) {
             instrumentDestDir.mkdirs();
         }
+        if (!buildOutputDirectory.exists()) {
+            buildOutputDirectory.mkdirs();
+        }
 
         if (CollectionUtils.isEmpty(xsltIncludes)) {
             getLog().debug("No xslt-includes given, using defaults");
         String[] includedFiles = scanner.getIncludedFiles();
 
         if (ArrayUtils.isEmpty(includedFiles)) {
-            getLog().info("No XSLT files found");
+            getLog().info("No XSLT files found in build output directory. Did you run 'mvn compile'?");
             return;
         }
 
         for (String includedFile : includedFiles) {
             try {
-                getLog().info("Instrumenting XSLT file " + includedFile);
+                getLog().info("Instrumenting XSLT file: " + includedFile);
                 instrumentXslt.initCoverageMap(new File(buildOutputDirectory, includedFile).getCanonicalPath());
             } catch (Exception e) {
                 getLog().error(e);

src/main/java/org/nuessler/maven/plugin/cakupan/CakupanTestMojo.java

 import com.google.common.base.Function;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Collections2;
+import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
 /**
         return classpathElements.toArray(new String[classpathElements.size()]);
     }
 
-    private Element createElementWithChildren(final String parentName, final String childName,
-            final List<String> children) {
-        Element[] includeElements = Collections2.transform(children, new Function<String, Element>() {
-            @Override
-            public Element apply(String input) {
-                return new Element(childName, input);
-            }
-        }).toArray(new Element[children.size()]);
-        return new Element(parentName, includeElements);
+    private Element createElementWithChildren(String parentName, final String childName, List<String> children) {
+        List<Element> includeElements = Lists.newArrayList(Iterables.transform(children,
+                new Function<String, Element>() {
+                    @Override
+                    public Element apply(String input) {
+                        return new Element(childName, input);
+                    }
+                }));
+        return new Element(parentName, includeElements.toArray(new Element[includeElements.size()]));
     }
 
     private void handleDefaults() {