Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.73 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Overwriting ant property from custom ant task
  2. <property file="prop1"/>
  3. <property file="prop2"/>
  4.        
  5. mg.prop = ${mg2.prop}
  6.        
  7. mg2.prop = Hello
  8.        
  9. String resolved = resolveProperty(propertyName);
  10. getProject().setProperty(propertyName, resolved);
  11.        
  12. log("Resolved property value = " + getProject().getProperty(propertyName));
  13.        
  14. <echo message="${mg.prop}"/>
  15.        
  16. <concat destfile="resolved.properties">
  17.     <fileset file="1.properties" />
  18.     <fileset file="2.properties" />
  19.     <fileset file="3.properties" />
  20. </concat>
  21.  
  22. <property file="resolved.properties"/>
  23.        
  24. <property name="x" value="6"/>
  25. <echo>${x}</echo>   <!-- will print 6 -->
  26. <var name="x" unset="true"/>
  27. <property name="x" value="12"/>
  28. <echo>${x}</echo>   <!-- will print 12 -->