title: Trouble building the GCM Demo Server application
body: <p>Whenever I try to build the GCM Demo Server <a href="http://developer.android.com/google/gcm/server.html" rel="noreferrer">from the documentation</a> using <code>ant</code>, I get 17 compilation errors. It seems that some GCM libraries are missing. How can I resolve these issues?</p>
  
  <pre><code> Errors:
  
    Buildfile: build.xml
  
  init:
  
  compile:
      [javac] Compiling 7 source files to /root/gcm/samples/gcm-demo-server/build/classes
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:18: package com.google.android.gcm.server does not exist
      [javac] import com.google.android.gcm.server.Constants;
      [javac]                                     ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:19: package com.google.android.gcm.server does not exist
      [javac] import com.google.android.gcm.server.Message;
      [javac]                                     ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:20: package com.google.android.gcm.server does not exist
      [javac] import com.google.android.gcm.server.MulticastResult;
      [javac]                                     ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:21: package com.google.android.gcm.server does not exist
      [javac] import com.google.android.gcm.server.Result;
      [javac]                                     ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:22: package com.google.android.gcm.server does not exist
      [javac] import com.google.android.gcm.server.Sender;
      [javac]                                     ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:46: cannot find symbol
      [javac] symbol  : class Sender
      [javac] location: class com.google.android.gcm.demo.server.SendAllMessagesServlet
      [javac]   private Sender sender;
      [javac]           ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:59: cannot find symbol
      [javac] symbol  : class Sender
      [javac] location: class com.google.android.gcm.demo.server.SendAllMessagesServlet
      [javac]   protected Sender newSender(ServletConfig config) {
      [javac]             ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:62: cannot find symbol
      [javac] symbol  : class Sender
      [javac] location: class com.google.android.gcm.demo.server.SendAllMessagesServlet
      [javac]     return new Sender(key);
      [javac]                ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:81: cannot find symbol
      [javac] symbol  : class Message
      [javac] location: class com.google.android.gcm.demo.server.SendAllMessagesServlet
      [javac]         Message message = new Message.Builder().build();
      [javac]         ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:81: package Message does not exist
      [javac]         Message message = new Message.Builder().build();
      [javac]                                      ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:82: cannot find symbol
      [javac] symbol  : class Result
      [javac] location: class com.google.android.gcm.demo.server.SendAllMessagesServlet
      [javac]         Result result = sender.send(message, registrationId, 5);
      [javac]         ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:115: cannot find symbol
      [javac] symbol: class Message
      [javac]         Message message = new Message.Builder().build();
      [javac]         ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:115: package Message does not exist
      [javac]         Message message = new Message.Builder().build();
      [javac]                                      ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:116: cannot find symbol
      [javac] symbol: class MulticastResult
      [javac]         MulticastResult multicastResult;
      [javac]         ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:123: cannot find symbol
      [javac] symbol: class Result
      [javac]         List&lt;Result&gt; results = multicastResult.getResults();
      [javac]              ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:127: cannot find symbol
      [javac] symbol: class Result
      [javac]           Result result = results.get(i);
      [javac]           ^
      [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:140: cannot find symbol
      [javac] symbol: variable Constants
      [javac]             if (error.equals(Constants.ERROR_NOT_REGISTERED)) {
      [javac]                              ^
      [javac] 17 errors
  
  BUILD FAILED
  </code></pre>