Browse Source

allow for java.nio.file.Path based target attributes

master
Dave Brosius Stefan Bodewig 8 years ago
parent
commit
c5728b3120
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      src/main/org/apache/tools/ant/IntrospectionHelper.java

+ 10
- 0
src/main/org/apache/tools/ant/IntrospectionHelper.java View File

@@ -1118,6 +1118,16 @@ public final class IntrospectionHelper {
}
};
}
// resolve relative nio paths through Project
if (java.nio.file.Path.class.equals(reflectedArg)) {
return new AttributeSetter(m, arg) {
@Override
public void set(final Project p, final Object parent, final String value) throws InvocationTargetException, IllegalAccessException {
m.invoke(parent, new Object[] { p.resolveFile(value).toPath() });
}
};
}
// resolve Resources/FileProviders as FileResources relative to Project:
if (Resource.class.equals(reflectedArg) || FileProvider.class.equals(reflectedArg)) {
return new AttributeSetter(m, arg) {


Loading…
Cancel
Save