|
|
@@ -86,6 +86,7 @@ public class Property extends Task { |
|
|
|
protected Path classpath; |
|
|
|
protected String env; |
|
|
|
protected Reference ref; |
|
|
|
protected String prefix; |
|
|
|
|
|
|
|
protected boolean userProperty; // set read-only properties |
|
|
|
|
|
|
@@ -124,6 +125,13 @@ public class Property extends Task { |
|
|
|
public File getFile() { |
|
|
|
return file; |
|
|
|
} |
|
|
|
|
|
|
|
public void setPrefix(String prefix) { |
|
|
|
this.prefix = prefix; |
|
|
|
if (!prefix.endsWith(".")) { |
|
|
|
this.prefix += "."; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void setRefid(Reference ref) { |
|
|
|
this.ref = ref; |
|
|
@@ -192,6 +200,10 @@ public class Property extends Task { |
|
|
|
location); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (file == null && resource == null && prefix != null) { |
|
|
|
throw new BuildException("Prefix is only valid when loading from a file or resource", location); |
|
|
|
} |
|
|
|
|
|
|
|
if ((name != null) && (value != null)) { |
|
|
|
addProperty(name, value); |
|
|
@@ -298,6 +310,11 @@ public class Property extends Task { |
|
|
|
String value = props.getProperty(name); |
|
|
|
|
|
|
|
String v = project.replaceProperties(value); |
|
|
|
|
|
|
|
if (prefix != null) { |
|
|
|
name = prefix + name; |
|
|
|
} |
|
|
|
|
|
|
|
addProperty(name, v); |
|
|
|
} |
|
|
|
} |
|
|
|