Move the SimpleAppCacheLinker out to sample land, it's not quite ready.

Review at http://gwt-code-reviews.appspot.com/1447813

Review by: rchandia@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10255 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/samples/mobilewebapp/README-MAVEN.txt b/samples/mobilewebapp/README-MAVEN.txt
index f3f5210..c5ba64c 100644
--- a/samples/mobilewebapp/README-MAVEN.txt
+++ b/samples/mobilewebapp/README-MAVEN.txt
@@ -45,6 +45,9 @@
   Select Java Build Path and click the Projects tab
 
   Click Add..., select gwt-user, and click OK
+  
+GWT developers can also use tools/scripts/maven_script.sh to push their
+own GWT jars into their local maven repo.
 
 -- Option B: Build from the command line with Maven --
 
diff --git a/samples/mobilewebapp/src/main/java/com/google/gwt/sample/core/Core.gwt.xml b/samples/mobilewebapp/src/main/java/com/google/gwt/sample/core/Core.gwt.xml
new file mode 100644
index 0000000..9c963e0
--- /dev/null
+++ b/samples/mobilewebapp/src/main/java/com/google/gwt/sample/core/Core.gwt.xml
@@ -0,0 +1,22 @@
+<!--                                                                        -->
+<!-- Copyright 2011 Google Inc.                                             -->
+<!-- Licensed under the Apache License, Version 2.0 (the "License"); you    -->
+<!-- may not use this file except in compliance with the License. You may   -->
+<!-- may obtain a copy of the License at                                    -->
+<!--                                                                        -->
+<!-- http://www.apache.org/licenses/LICENSE-2.0                             -->
+<!--                                                                        -->
+<!-- Unless required by applicable law or agreed to in writing, software    -->
+<!-- distributed under the License is distributed on an "AS IS" BASIS,      -->
+<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        -->
+<!-- implied. License for the specific language governing permissions and   -->
+<!-- limitations under the License.                                         -->
+
+<!-- Types and resources required to support primitive system operation.    -->
+<!--                                                                        -->
+<!-- Types from this module are visible to and imported into user code.     -->
+<!-- Every module should directly or indirectly inherit this module.        -->
+<!--                                                                        -->
+<module>
+  <inherits name="com.google.gwt.core.Core" />
+</module>
diff --git a/dev/core/src/com/google/gwt/core/linker/SimpleAppCacheLinker.java b/samples/mobilewebapp/src/main/java/com/google/gwt/sample/core/linker/SimpleAppCacheLinker.java
similarity index 95%
rename from dev/core/src/com/google/gwt/core/linker/SimpleAppCacheLinker.java
rename to samples/mobilewebapp/src/main/java/com/google/gwt/sample/core/linker/SimpleAppCacheLinker.java
index da09f6c..433c187 100644
--- a/dev/core/src/com/google/gwt/core/linker/SimpleAppCacheLinker.java
+++ b/samples/mobilewebapp/src/main/java/com/google/gwt/sample/core/linker/SimpleAppCacheLinker.java
@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package com.google.gwt.core.linker;
+package com.google.gwt.sample.core.linker;
 
 import com.google.gwt.core.ext.LinkerContext;
 import com.google.gwt.core.ext.TreeLogger;
@@ -30,7 +30,10 @@
 import java.util.Date;
 
 /**
- * AppCacheLinker - linker for public path resources in the Application Cache.
+ * Linker for public path resources in the Application Cache.
+ * <p>
+ * <strong>Warning</strong>This linker sends all permutations to clients, 
+ * making it inappropriate for most production use.</strong>
  * <p>
  * To use:
  * <ol>
diff --git a/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml b/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml
index 03d8ee6..b80b9b6 100644
--- a/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml
+++ b/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml
@@ -8,7 +8,9 @@
   <inherits name='com.google.gwt.editor.Editor'/>
   <inherits name='com.google.gwt.sample.mobilewebapp.FormFactor'/>
   <inherits name='com.google.web.bindery.requestfactory.RequestFactory'/>
+  
   <inherits name='com.google.gwt.sample.gaerequest.GaeRequest'/>
+  <inherits name='com.google.gwt.sample.core.Core'/>
 
   <!-- Specify the app entry point class.                         -->
   <entry-point class='com.google.gwt.sample.mobilewebapp.client.MobileWebApp'/>
diff --git a/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/linker/AppCacheLinker.java b/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/linker/AppCacheLinker.java
index 36ddc28..e1a4ced 100644
--- a/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/linker/AppCacheLinker.java
+++ b/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/linker/AppCacheLinker.java
@@ -16,12 +16,15 @@
 package com.google.gwt.sample.mobilewebapp.linker;
 
 import com.google.gwt.core.ext.linker.Shardable;
-import com.google.gwt.core.linker.SimpleAppCacheLinker;
+import com.google.gwt.sample.core.linker.SimpleAppCacheLinker;
 
 /**
- * A custom linker that generates an app cache manifest with the
- * files generated by the GWT compiler and the static files used
- * by this application.
+ * A custom linker that generates an app cache manifest with the files generated
+ * by the GWT compiler and the static files used by this application.
+ * <p>
+ * Before using this approach with production code be sure that you understand
+ * the limitations of {@link SimpleAppCacheLinker}, namely that it sends all
+ * permutations to the client.
  * 
  * @see SimpleAppCacheLinker
  */
diff --git a/dev/core/test/com/google/gwt/core/linker/SimpleAppCacheLinkerTest.java b/samples/mobilewebapp/src/test/java/com/google/gwt/sample/core/linker/SimpleAppCacheLinkerTest.java
similarity index 97%
rename from dev/core/test/com/google/gwt/core/linker/SimpleAppCacheLinkerTest.java
rename to samples/mobilewebapp/src/test/java/com/google/gwt/sample/core/linker/SimpleAppCacheLinkerTest.java
index 0861d14..a64ee40 100644
--- a/dev/core/test/com/google/gwt/core/linker/SimpleAppCacheLinkerTest.java
+++ b/samples/mobilewebapp/src/test/java/com/google/gwt/sample/core/linker/SimpleAppCacheLinkerTest.java
@@ -1,6 +1,6 @@
 // Copyright 2011 Google Inc. All Rights Reserved.
 
-package com.google.gwt.core.linker;
+package com.google.gwt.sample.core.linker;
 
 import com.google.gwt.core.ext.LinkerContext;
 import com.google.gwt.core.ext.TreeLogger;
@@ -10,6 +10,7 @@
 import com.google.gwt.core.ext.linker.SelectionProperty;
 import com.google.gwt.core.ext.linker.SyntheticArtifact;
 import com.google.gwt.core.ext.linker.impl.SelectionInformation;
+import com.google.gwt.sample.core.linker.SimpleAppCacheLinker;
 
 import junit.framework.TestCase;
 
diff --git a/user/test/com/google/gwt/core/ext/LinkerSuite.java b/user/test/com/google/gwt/core/ext/LinkerSuite.java
index 556f5dc..7e67af1 100644
--- a/user/test/com/google/gwt/core/ext/LinkerSuite.java
+++ b/user/test/com/google/gwt/core/ext/LinkerSuite.java
@@ -20,7 +20,6 @@
 import com.google.gwt.core.ext.test.CrossSiteIframeLinkerTest;
 import com.google.gwt.core.ext.test.IFrameLinkerTest;
 import com.google.gwt.core.ext.test.XSLinkerTest;
-import com.google.gwt.core.linker.SimpleAppCacheLinkerTest;
 import com.google.gwt.junit.tools.GWTTestSuite;
 
 import junit.framework.Test;
@@ -41,7 +40,6 @@
     suite.addTestSuite(SelectionScriptJavaScriptTest.class);
     suite.addTestSuite(SelectionScriptLinkerUnitTest.class);
     suite.addTestSuite(XSLinkerTest.class);
-    suite.addTestSuite(SimpleAppCacheLinkerTest.class);
     /*
      * Note: Single-script linking is disabled by default, because it only works
      * when the test is run for a single permutation.