• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Not to change the subject, but . . . anyone have some Ant/Properties help for me?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Not to change the subject, but . . . anyone have some Ant/Properties help for me?


  • Subject: Not to change the subject, but . . . anyone have some Ant/Properties help for me?
  • From: Andrew Kinnie <email@hidden>
  • Date: Tue, 12 Jul 2011 13:50:21 -0400

I am trying to add an svn commit number to the front page of my basically headless push app.  However, I am apparently doing something stupid and missing something obvious.

I added this to the top of the build.xml script for the app (after the project tag):

<!-- Write current build and revision #s into Properties file. -->
<target name="updateBuildNumber">

<exec executable="svnversion" dir="" outputproperty="svn.revision" />
<echo>Revision: ${svn.revision}</echo>
<replaceregexp file="Resources/Properties"
match="RevisionNumber=(.*)"
replace="RevisionNumber=${svn.revision}" />
<property environment="env" />
<echo>Build Number: ${env.BUILD_NUMBER}</echo>
<replaceregexp file="Resources/Properties"
match="BuildNumber=(.*)"
replace="BuildNumber=${env.BUILD_NUMBER}" />
</target>

I added this to my Properties file for the app (At the top):

RevisionNumber=x
BuildNumber=x

However, the script is not substituting, and I am not getting anything other than "x" with the following code in my Main.java class

public String revisionNumber = ERXProperties.stringForKey("RevisionNumber");
public String buildNumber = ERXProperties.stringForKey("BuildNumber");

public String revisionNumber(){
System.out.println("buildNumber is " + buildNumber + " and revisionNumber is " + revisionNumber);
return revisionNumber;
}

What blindingly obvious thing am I missing?

Andrew
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Not to change the subject, but . . . anyone have some Ant/Properties help for me?
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Dynamic table with editable content
  • Next by Date: Re: ajaxgrid and d2w
  • Previous by thread: Re: Xserve, Linux or Cloud
  • Next by thread: Re: Not to change the subject, but . . . anyone have some Ant/Properties help for me?
  • Index(es):
    • Date
    • Thread