由于应用引擎的即将到来的限制,即使用Java 7部署应用程序,我需要切换到Java 8应用程序并进行部署,这会导致与gwt相关的错误。
我试图将gwt插件的版本从2.6.1更改为2.8.2和2.8.0。
我还尝试过根据其他关于gwt错误的帖子添加依赖项,但是它没有任何改变。
最后,我尝试使用以下命令在不编译gwt项目的情况下部署应用程序:clean install -Dgwt.compiler.skip = true package appengine:update应用程序已成功部署但无法正常工作,因此我仍然需要找到解决方案。
这是我的pom.xml文件的一部分
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
...
<properties>
<appId>sandaya-dev</appId>
<appVersion>9</appVersion>
<module>default</module>
...
<gwt-plugin.version>2.6.1</gwt-plugin.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt-plugin.version}</version>
<configuration>
<compileTargets>
<value>com.insightos.apps.sandaya.InsightOS</value>
</compileTargets>
<compileSourcesArtifacts>
<compileSourcesArtifact>com.insightos.ui:UI</compileSourcesArtifact>
<compileSourcesArtifact>com.insightos.leisure:LeisureViews</compileSourcesArtifact>
<compileSourcesArtifact>com.insightos.data:GenericDao</compileSourcesArtifact>
<compileSourcesArtifact>com.insightos:Utils</compileSourcesArtifact>
<compileSourcesArtifact>com.insightos.leisure.data:LeisureDao</compileSourcesArtifact>
<compileSourcesArtifact>com.insightos.data:GA</compileSourcesArtifact>
</compileSourcesArtifacts>
<module>com.insightos.apps.sandaya.InsightOS</module>
</configuration>
</plugin>
...
</plugins>
...
</build>
这是我给部署到appengine的命令
-X clean install appengine:update
这是我从部署中得到的错误(我删节了几行,因为对于Stackoverflow而言太长了):
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.134 s
[INFO] Finished at: 2018-12-25T12:29:25+01:00
[INFO] Final Memory: 71M/817M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.1:compile (default) on project Sandaya: Command [[
...
[ERROR] ]] failed with status 1
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.1:compile (default) on project Sandaya: Command [[
/bin/sh -c /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/bin/java -Xmx1024m -XX:MaxPermSize=256m -classpath /Users/martijn2/Documents/oxygen-workspaces/acsi/sandaya/target/classes:/Users/martijn2/Documents/oxygen-workspaces/acsi/sandaya/src/main/java:/Users...
]] failed with status 1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.codehaus.mojo.gwt.shell.ForkedProcessExecutionException: Command [[
/bin/sh -c /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/bin/java -Xmx1024m -XX:MaxPermSize=256m -classpath /Users/...
]] failed with status 1
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo$JavaCommand.execute(AbstractGwtShellMojo.java:485)
at org.codehaus.mojo.gwt.shell.CompileMojo.compile(CompileMojo.java:446)
at org.codehaus.mojo.gwt.shell.CompileMojo.doExecute(CompileMojo.java:351)
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:172)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
[ERROR]
[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/MojoExecutionException
我希望该构建能够成功并且不会出现这些错误,并且希望将正在运行的应用程序部署到Java 8中的应用程序引擎。在此先感谢您的帮助