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
Original issue reported on code.google.com by
jatw...@linuxstuff.org
on 22 Sep 2010 at 5:19