Labels

Monday, April 9, 2012

Double dereference for Ant Property

Just random note on solving the double dereference that ANT property will not allow.


  
 
    
    
    
    
     
    
       myApp     : ${org.cnci.firstapp}
       myCompany : ${firstCompany}
       myPackage : ${firstPackage}
       myClass   : ${firstClass}
    
 
 
 
    
    
    
       
    
 
 
 
    
    
    
    
     
    
       myApp     : ${org.cnci.secondapp}
       myCompany : ${secondCompany}
       myPackage : ${secondPackage}
       myClass   : ${secondClass}
    
 
 
 

And the output looks like this:
NOT-WORKING-double-dereferences:
     [echo] 
     [echo]         myApp     : SimpleIRC
     [echo]         myCompany : cnci
     [echo]         myPackage : org.cnci.firstapp
     [echo]         myClass   : ${org.${firstCompany}.firstapp}
     [echo]         
WORKING-double-dereferences:
     [echo] 
     [echo]         myApp     : AdvanceIRC
     [echo]         myCompany : cnci
     [echo]         myPackage : org.cnci.secondapp
     [echo]         myClass   : AdvanceIRC
     [echo]         

No comments:

Post a Comment