Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven GAE Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.12:devserver [...] NoSuchElementException

Maven is having this problem and none of the solutions I found worked :(.

pom.xml https://github.com/Brkk/text-share/blob/master/pom.xml

web.xml https://github.com/Brkk/text-share/blob/master/src/main/webapp/WEB-INF/web.xml

Maven is generating

[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building text-share 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> appengine-maven-plugin:1.9.12:devserver (default-cli) @ text-share >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ text-share ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/paulotabarro/Desktop/workspace/text-share/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ text-share ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ text-share ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/paulotabarro/Desktop/workspace/text-share/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ text-share ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ text-share ---
[INFO] 
[INFO] --- maven-war-plugin:2.4:war (default-war) @ text-share ---
[INFO] Packaging webapp
[INFO] Assembling webapp [text-share] in [/Users/paulotabarro/Desktop/workspace/text-share/target/text-share-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp webResources [/Users/paulotabarro/Desktop/workspace/text-share/src/main/webapp/WEB-INF] to [/Users/paulotabarro/Desktop/workspace/text-share/target/text-share-1.0-SNAPSHOT]
[INFO] Copying webapp resources [/Users/paulotabarro/Desktop/workspace/text-share/src/main/webapp]
[INFO] Webapp assembled in [101 msecs]
[INFO] Building war: /Users/paulotabarro/Desktop/workspace/text-share/target/text-share-1.0-SNAPSHOT.war
[INFO] 
[INFO] <<< appengine-maven-plugin:1.9.12:devserver (default-cli) @ text-share <<<
[INFO] 
[INFO] --- appengine-maven-plugin:1.9.12:devserver (default-cli) @ text-share ---
[INFO] 
[INFO] Google App Engine Java SDK - Running Development Server
[INFO] 
[INFO] Retrieving Google App Engine Java SDK from Maven
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.692 s
[INFO] Finished at: 2014-10-14T19:12:13-08:00
[INFO] Final Memory: 16M/184M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.12:devserver (default-cli) on project text-share: Execution default-cli of goal com.google.appengine:appengine-maven-plugin:1.9.12:devserver failed. NoSuchElementException -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
like image 707
bobleujr Avatar asked Oct 15 '14 02:10

bobleujr


1 Answers

According to this page, https://code.google.com/p/appengine-maven-plugin/issues/detail?id=41 , you need to add the plugin not only in the <build><pluginManagement> section, but also in the <build><plugins> section. So you would need to extend your pom as follows:

<build>
    <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
    <pluginManagement>
        <!-- other plugins here -->
        <plugin>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
            <version>1.9.12</version>
            <configuration>
                <enableJarClasses>false</enableJarClasses>
            </configuration>
        </plugin>
    </pluginManagement>
    <plugins>
        <plugin>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>
like image 193
DB5 Avatar answered Oct 15 '22 09:10

DB5