2013-03-02 79 views
3

我正在嘗試使用谷歌應用程序引擎簡單的基於Spring的應用程序與maven。我發現這種web應用程序可以使用maven原型(沒有spring,但我可以自己添加):Maven GAE。Maven GAE原型不工作

所以我用下面的命令:

mvn archetype:generate -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-jsp -DgroupId=com.example -DartifactId=form -DarchetypeRepository=http://maven-gae-plugin.googlecode.com/svn/repository 

然而,當我試圖用「MVN GAE:運行」它不工作,我不知道如何解決這個失蹤的要求:

[INFO] BUILD FAILURE 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] Total time: 7.444s 
    [INFO] Finished at: Sat Mar 02 21:04:22 CET 2013 
    [INFO] Final Memory: 6M/15M 
    [INFO] ------------------------------------------------------------------------ 
    [ERROR] Failed to execute goal net.kindleit:maven-gae-plugin:0.9.5:run (default-cli) on project form: Execution default-cli of goal net.kindleit:maven-gae-plugin:0.9.5:run failed: Plugin net.kindleit:maven-gae-plugin:0.9.5 or one of its dependencies could not be resolved: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.5(): Failed to read artifact descriptor for net.kindleit:gae-runtime:pom:1.7.5: Failure to find net.kindleit:maven-gae-parent:pom:0.9.6-SNAPSHOT in http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.dev.java.net has elapsed or updates are forced -> [Help 1] 
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.kindleit:maven-gae-plugin:0.9.5:run (default-cli) on project form: Execution default-cli of goal net.kindleit:maven-gae-plugin:0.9.5:run failed: Plugin net.kindleit:maven-gae-plugin:0.9.5 or one of its dependencies could not be resolved: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.5() 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) 
     at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) 
     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) 
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) 
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 
     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) 
     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) 
     at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
     at java.lang.reflect.Method.invoke(Method.java:597) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) 
    Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal net.kindleit:maven-gae-plugin:0.9.5:run failed: Plugin net.kindleit:maven-gae-plugin:0.9.5 or one of its dependencies could not be resolved: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.5() 
     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:82) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) 
     ... 19 more 
    Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin net.kindleit:maven-gae-plugin:0.9.5 or one of its dependencies could not be resolved: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.5() 
     at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:211) 
     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:353) 
     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:321) 
     at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:175) 
     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:78) 
     ... 20 more 
    Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.5() 
     at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:258) 
     at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308) 
     at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:199) 
     ... 24 more 
    Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for net.kindleit:gae-runtime:pom:1.7.5 
     at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:331) 
     at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186) 
     at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:412) 
     at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240) 
     ... 26 more 
    Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Failure to find net.kindleit:maven-gae-parent:pom:0.9.6-SNAPSHOT in http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.dev.java.net has elapsed or updates are forced 
     at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:126) 
     at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:813) 
     at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:664) 
     at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:310) 
     at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232) 
     at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:322) 
     ... 29 more 
    Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failure to find net.kindleit:maven-gae-parent:pom:0.9.6-SNAPSHOT in http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.dev.java.net has elapsed or updates are forced 
     at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538) 
     at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216) 
     at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193) 
     at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:122) 
     ... 34 more 
    Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to find net.kindleit:maven-gae-parent:pom:0.9.6-SNAPSHOT in http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.dev.java.net has elapsed or updates are forced 
     at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:230) 
     at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:204) 
     at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:427) 
     ... 37 more 

A可以補充一點,我嘗試使用Maven-GAE-插件,但沒有成功,指出錯誤版本....

+0

經過一段時間我找到解決方案[這裏] [1]。 [1]:http://stackoverflow.com/questions/15094381/mvn-gae-plugin-suddenly-broken – PastorPL 2013-03-02 23:13:17

+0

一段時間後,我發現溶液[這裏] [1]。 [1]:http://stackoverflow.com/questions/15094381/mvn-gae-plugin-suddenly-broken – PastorPL 2013-03-02 23:13:41

+0

爽哦,我還沒有看到你的留言... – ZiglioUK 2013-03-03 05:09:13

回答

5

here

你可以試試嗎?

<properties> 
    <gae.version>1.7.5</gae.version> 
    <gae-runtime.version>1.7.5.1</gae-runtime.version> 
</properties> 

<plugin> 
    <groupId>net.kindleit</groupId> 
    <artifactId>maven-gae-plugin</artifactId> 
    <version>${maven.gae.plugin.version}</version> 
    <configuration> 
     <unpackVersion>${gae.version}</unpackVersion> 
     <serverId>appengine.google.com</serverId> 
     <appDir>${webappDirectory}</appDir> 
    </configuration> 
    <dependencies> 
     <dependency> 
      <groupId>net.kindleit</groupId> 
      <artifactId>gae-runtime</artifactId> 
      <version>${gae-runtime.version}</version> 
      <type>pom</type> 
     </dependency> 
    </dependencies> 
</plugin> 
+0

謝謝,我已經發現這已經但不能發佈爲答案 – PastorPL 2013-03-03 10:06:54

+0

是啊,我知道,這是非常挑剔,不喜歡簡短的回答... – ZiglioUK 2013-03-03 21:47:09

+0

我試過這個,但沒有爲我工作 – xybrek 2013-03-26 14:19:31