This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 210
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: 5812
    
    7

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


JBoss In Action
Dennis Putnam
Ranch Hand

Joined: Feb 03, 2012
Posts: 210
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: 210
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: 210
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
 
Similar Threads
"Could not find main class" problem in jar file
Linux vs. Windows jar file - cannot find main class
replaceregexp workaround/bug
injecting a value into a variable from a build process
ANT - MANIFEST.MF