java - How to fix an error from the gwt when deploying an application in java 8 with google-app-engine
问题描述
With the incoming restriction of app engine to deploy applications with java 7, I need to switch to java 8 my application and deploying it creates errors related to the gwt.
I've tried to change the versions of the gwt plugin, from 2.6.1 to 2.8.2 and 2.8.0.
I've also tried to add dependencies according to other posts on the subject of gwt errors but it didn't change anything.
Finally I tried to deploy the application without compiling the gwt project with this command : clean install -Dgwt.compiler.skip=true package appengine:update The app was successfully deployed but doesn't work so I still need to find a solution.
Here are parts of my pom.xml file
<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>
Here is the command I give to deploy to appengine
-X clean install appengine:update
And here are the errors I'm getting from the deployment (I truncated some lines because too long for 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
I expect the build to be a success and not to have these errors, and to obtain a working application deployed to app engine in Java 8. Thanks by advance for any help
解决方案
推荐阅读
- html - 除非我做了很多换行符,否则文本会卡在导航栏旁边
- python - 从 Python Dictionary 生成并格式化文本的收据样式
- python - 每次计数器达到一定数量时,自动将输出保存到新的 Json 文件中 Python
- python - Kivy pyJnius 访问系统密钥
- r - 我想在 for 循环中使用 ggplot2 制作多个绘图,但它无法识别 aes() 中的 Y 变量
- mongodb - 一次请求更新数组子文档的字段
- javascript - 在表格中显示数据的问题。反应 JS
- node.js - 在 MVC 设计中,您应该为每个模型或每个功能组设置一个控制器吗?
- php - Laravel 请求无限选择
- php - 更新后wordpress页面内的php停止工作