aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes @SOMETHING@ in ant file, how does it work ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "@SOMETHING@ in ant file, how does it work ?" Watch "@SOMETHING@ in ant file, how does it work ?" New topic
Author

@SOMETHING@ in ant file, how does it work ?

Mikhael Jenings
Greenhorn

Joined: Apr 14, 2009
Posts: 25
Please look at the below snippet from an ant file,

......
# foo @BUILD_DATE@
fooVersion=@BUILD_NUMBER@
#
# License Keys
#
licenseKey=@LICENSE_KEY@
licenseSecure=@LICENSE_SECURE@


# Spring substitution properties
barService.portName=BarService
barService.serviceName=BarServiceService
barService.wsdlDocumentUrl=@BAR_SERVICE_WSDL_URL@
......

This is from a project using Spring(changed a bit though).

I wanted to know how does the @BUILD_NUMBER@ and the other @...@ work ?
What are these called ?
What do they mean ?
Where are they getting the values from ?



Thanks
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

These are called token filters. Check the filter task to see how they are used. In your case, they are probably using an external properties file holding the tokens' value.


[My Blog]
All roads lead to JavaRanch
Mikhael Jenings
Greenhorn

Joined: Apr 14, 2009
Posts: 25
I am extremely sorry, I made a mistake.

The snippet is not from an ant file, it is from a properties file.
Now how does this work ?
(I don't see any other file containing the values for the tokens.)


Thanks
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

Christophe's answer applies to a properties file being processed by Ant.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @SOMETHING@ in ant file, how does it work ?