File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Nested 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 "Nested "replaceproperties" error" Watch "Nested "replaceproperties" error" New topic
Author

Nested "replaceproperties" error

Dennis Putnam
Ranch Hand

Joined: Feb 03, 2012
Posts: 217
This is actually an old thread that I need to resurrect. However, the original thread had evolved to a point where it no longer really related to the original topic so I hope no one gets upset that I am starting a new one. Anyway, I am trying to increment a serial number for my build and on advice wound up trying to use "buildnumber". Here is my current xml:

The error I get is:

newmakejar.xml:31: filterchain doesn't support the nested "replaceproperties" element.

Can someone help me get this working. Thanks.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

I think you want <expandproperties/>, not <replaceproperties/>.


JBoss In Action
Dennis Putnam
Ranch Hand

Joined: Feb 03, 2012
Posts: 217
Thanks. That got rid of the error and the jar file now builds. However, the serial number is not being incremented. I obviously am still missing a piece of the puzzle.
Dennis Putnam
Ranch Hand

Joined: Feb 03, 2012
Posts: 217
I think I figured out what is happening but not how to fix it. If I understand correctly, buildnumber simply sets the variable ${build.number}. The question becomes how to get that into my resource file. Do i put that variable name directly into the file or do I still need to do some kind of substitution in the build XML?
Dennis Putnam
Ranch Hand

Joined: Feb 03, 2012
Posts: 217
I got it. I needed to add a propertyfile task after the copy.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Nested "replaceproperties" error