gavioto / m2e-extensions

Automatically exported from code.google.com/p/m2e-extensions
0 stars 0 forks source link

pmd extension explodes on missing included directory #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If a File is specifically included in the pmd-plugin configuration, but doesn't 
exist, the plugin configuration translator will get confused and attempt to 
exclude it.  I *think* it's better to include it anyway and trust the developer 
knows what they're doing.

(isDirectory returns false if the File does not exist)

----------

diff -r 3769fcc4dca9 
maven/ide/plugins/org.maven.ide.eclipse.extensions.project.configurators.pmd/src
/main/java/org/maven/ide/eclipse/extensions/project/configurators/pmd/MavenPlugi
nConfigurationTranslator.java
--- 
a/maven/ide/plugins/org.maven.ide.eclipse.extensions.project.configurators.pmd/s
rc/main/java/org/maven/ide/eclipse/extensions/project/configurators/pmd/MavenPlu
ginConfigurationTranslator.java      Tue Sep 21 17:05:50 2010 -0700
+++ 
b/maven/ide/plugins/org.maven.ide.eclipse.extensions.project.configurators.pmd/s
rc/main/java/org/maven/ide/eclipse/extensions/project/configurators/pmd/MavenPlu
ginConfigurationTranslator.java      Wed Sep 22 10:14:47 2010 -0700
@@ -199,7 +199,11 @@
         List<File> filteredIncludeRoots = new LinkedList<File>();
         for (File f : includeRoots) {
             int idx = excludeRootsFromConfig.indexOf(f);
-            if (f.isDirectory() && (idx == -1)) {
+            /**
+             * Be optimistic when adding inclusions; if the specified File 
does not exist yet, then assume
+             * it will at some point and include it.
+             */
+            if (idx == -1 && (f.isDirectory() || !f.exists())) {
                 filteredIncludeRoots.add(f);
             } else {

Original issue reported on code.google.com by jatw...@linuxstuff.org on 22 Sep 2010 at 5:19

GoogleCodeExporter commented 9 years ago
Thanks..will look into it..

Original comment by mkann...@gmail.com on 28 Sep 2010 at 11:24

GoogleCodeExporter commented 9 years ago
resolved as of f0453cdde3

Original comment by mr.id...@gmail.com on 20 Dec 2010 at 5:15