3

I am trying to set up a GCM Demo Application. http://developer.android.com/guide/google/gcm/demo.html

I am stuck trying to create a war file: In a shell window, go to the gcm-demo-server directory.

Generate the server's WAR file by running ant war:

I am using Windows 7 how exactly can I create this war file?

user182192
  • 729
  • 3
  • 14
  • 26
  • According to the above output, you generated the war file and it's under the `dist` directory which is probably under the gcm-demo-server directory. Is it not there? – David W. Jul 11 '12 at 19:08
  • 1
    no i didnt. This is the output I am suppose to get. Where do I put the command line $ant war? – user182192 Jul 11 '12 at 19:23
  • You removed the output I was looking at. What output ***did*** you get? Did you get any output after running `ant`? Is `ant` installed? What about the Java Developer Kit? – David W. Jul 11 '12 at 19:41
  • @user182192 did you manage run ant war command on Windows 7? – Mehmet Emre Portakal Aug 01 '12 at 08:44

1 Answers1

1

Create a batch program called build.bat, containing the following content:

call ant war
pause

This will launch a shell window within which you'll see the ANT output.

Notes:

  • This assumes that ANT has been installed correctly, with the "ant" executable available on the user's PATH
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
  • Thanks! I created the batch file. How do you install the ANT? I downloaded the zip file from her http://ant.apache.org/bindownload.cgi. What do I do with the zip file? – user182192 Jul 12 '12 at 17:11
  • Thanks now getting this error: C:\Program Files (x86)\Android\android-sdk\extras\google\gcm\gcm-server>call ant war Buildfile: C:\Program Files (x86)\Android\android-sdk\extras\google\gcm\gcm-serv er\build.xml BUILD FAILED Target "war" does not exist in the project "gcm-server". Total time: 0 seconds Press any key to continue . . . – user182192 Jul 15 '12 at 23:12
  • @user182192 That error indicates that there is no target called "war" in the build file that ANT is running. Tip run ANT as follows to see the list of available targets "ant -p". BTW this question has run it's course. Not only are you now introducing new questions, you haven't accepted the original one. I would strongly advise reading thru the ANT tutorial material to see how to run ANT and what it can do for you. – Mark O'Connor Jul 16 '12 at 15:46