Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't run maven com.google.appengine.archetypes:guestbook-archetype:1.7.7 on Windows
    text
    copied!<p>I want to create an App Engine project using Maven as described here: <a href="https://developers.google.com/appengine/docs/java/tools/maven" rel="nofollow noreferrer">https://developers.google.com/appengine/docs/java/tools/maven</a> but encounter some problems.</p> <p><code>mvn -v</code> outputs</p> <pre><code>Maven home: D:\Shared\apache-maven-3.0.5\bin\.. Java version: 1.7.0_13, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.7.0_13\jre Default locale: de_AT, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows" </code></pre> <p>and</p> <pre><code>mvn archetype:generate </code></pre> <p>also works as expected, however when I enter</p> <pre><code>com.google.appengine.archetypes:guestbook-archetype </code></pre> <p>nothing happens afterwards, meaning it prompts again "<em>Choose a number or apply filter [..]</em>".</p> <p>I am however able to create a project using a modified command from the question <a href="https://stackoverflow.com/questions/15178931/maven-gae-archetype-not-working">Maven GAE archetype not working</a> that is:</p> <pre><code>mvn archetype:generate -DarchetypeGroupId=com.google.appengine.archetypes -DarchetypeArtifactId=guestbook-archetype -DarchetypeVersion=1.7.7 </code></pre> <p>The output is:</p> <pre><code>[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] &gt;&gt;&gt; maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom &gt;&gt; &gt; [INFO] [INFO] &lt;&lt;&lt; maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom &lt;&lt; &lt; [INFO] [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom -- - [INFO] Generating project in Interactive mode [INFO] Archetype repository missing. Using the one from [com.google.appengine.ar chetypes:guestbook-archetype:1.7.7] found in catalog remote </code></pre> <p>Then it lets me define the 4 values for the 4 properties and then prints several lines that also state <code>[INFO] BUILD SUCCESS</code>.</p> <p>However, when I then switch to the directory (using <code>cd a</code> in this example) and run <code>mvn verify</code> or <code>mvn appengine:devserver</code> the following test fails:</p> <pre><code>Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.526 sec Results : Failed tests: testDoGet(a.GuestbookServletTest): expected:&lt;Hello, test[] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.826s [INFO] Finished at: Sun May 05 21:47:32 CEST 2013 [INFO] Final Memory: 14M/212M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2. 10:test (default-test) on project a: There are test failures. [ERROR] [ERROR] Please refer to D:\Shared\maven-projects\a\target\surefire-reports for t he individual test results. [ERROR] -&gt; [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc eption </code></pre> <p>In the file <code>D:\Shared\maven-projects\a\target\surefire-reports\a.GuestbookServletTest.txt</code> I noticed the following:</p> <pre><code>junit.framework.ComparisonFailure: expected:&lt;Hello, test[] &gt; but was:&lt;Hello, test[ ] &gt; </code></pre> <p>As Hex, it is</p> <pre><code>6a 75 6e 69 74 2e 66 72 61 6d 65 77 6f 72 6b 2e 43 6f 6d 70 61 72 69 73 6f 6e 46 61 69 6c 75 72 65 3a 20 65 78 70 65 63 74 65 64 3a 3c 48 65 6c 6c 6f 2c 20 74 65 73 74 5b 5d 0a 3e 20 62 75 74 20 77 61 73 3a 3c 48 65 6c 6c 6f 2c 20 74 65 73 74 5b 0d 5d 0a 3e </code></pre> <p><strong>As you can see, in the actual output there is a <code>0d</code> character between the square brackets. In the expectation, there isn't anything between the square brackets.</strong> I looked it up and it seems to be a <strong>carriage return</strong>.</p> <p>What should I do? Could this be an issue with my platform that is <code>Cp1252</code> and not <code>UTF-8</code>?</p> <p>I also tried generating the project setting <code>file.encoding</code> like</p> <pre><code>mvn archetype:generate -DarchetypeGroupId=com.google.appengine.archetypes -DarchetypeArtifactId=guestbook-archetype -DarchetypeVersion=1.7.7 -Dfile.encoding="UTF-8" </code></pre> <p>and even</p> <pre><code>mvn archetype:generate -DarchetypeGroupId=com.google.appengine.archetypes -DarchetypeArtifactId=guestbook-archetype -DarchetypeVersion=1.7.7 -Dfile.encoding="Cp1252" </code></pre> <p>but there still is that exta <code>0d</code> character in the output.</p> <p>I'd be grateful if anyone could help me getting this to work.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload