0

简短摘要:作为 Bamboo 计划的一部分,GWT 编译运行良好,但生成的 nocache.js 包含(重新)编译消息。

我最近在更改应用程序的编译和部署方式时遇到了一些麻烦。配置: - GWT 2.4.0 - Maven GWT 插件 - Bamboo

在我的机器上运行 GWT 编译一切正常,可以在 dev 模式和 js 模式下运行。运行 maven 编译(通过 eclipse - maven - run as - package)执行良好,nocache.js 看起来不错。在 XP 机器上或使用 Solaris+Bamboo 运行命令行 maven 编译会产生错误的 nocache.js,即使生成的 html 看起来没问题。事实上, *.cache.html 与我机器上的相同。

因此,我机器上的 module.nocache.js 包含对唯一命名的 html 文件的正确引用,而受影响机器上的 nocache.js(?)不包含任何此类引用。

GWT 编译器启动选项在所有机器上都是相同的。清除所有机器上的目标和战争文件夹。

计划摘要:

[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ myproject ---
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ myproject ---
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ myproject ---
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ myproject ---
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ myproject ---
[INFO] --- gwt-maven-plugin:2.4.0:compile (default) @ myproject ---
[INFO]    Compilation succeeded -- 639,969s
[INFO] --- maven-war-plugin:2.2:war (default-war) @ myproject ---
[INFO] Packaging webapp
[INFO] Assembling webapp [myproject] in [.....\myproject\target\myproject-2.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [....\myproject\war]
[INFO] Webapp assembled in [14125 msecs]
[INFO] Building war: .....\myproject\target\myproject-2.0-SNAPSHOT.war
[INFO] --- maven-source-plugin:2.1.2:jar-no-fork (attach-sources) @ myproject ---
[INFO] --- gwt-maven-plugin:2.4.0:test (default) @ myproject ---
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ myproject ---
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ myproject ---

在本地,在 Eclipse 中,我已经关闭了除了我正在编译的项目之外的所有项目,因此所有依赖项都通过 maven 检索。Eclipse 发出了很多错误信号,但我从 Eclipse 运行 Maven 目标并安装,结果再次正常。生成的 nocache.js 文件与编译时间相同,它们不会被检索或遗留下来。

我很困惑,不知何故,在 Bamboo 机器上,Maven GWT 编译插件已自行决定为开发而编译,我假设。


附加信息,Bamboo 构建日志。它似乎正在使用标准链接器,并且看起来与本地机器上的相同:

build   06-Aug-2012 20:18:35    [INFO]    Permutation 0 (strong name F96236D63A05E1D33308D4FE26EDA9F9) has an initial download size of 4937614 and total script size of 4937614
build   06-Aug-2012 20:18:35    [INFO]    Invoking Linker RPC policy file manifest
build   06-Aug-2012 20:18:35    [INFO]    Invoking Linker Standard
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker RPC log linker
build   06-Aug-2012 20:18:36    [INFO]    Emitting RPC log files
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker Export CompilationResult symbol maps
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker Emit compile report artifacts
build   06-Aug-2012 20:18:36    [INFO]    Permutation 1 (strong name B836CC45CC0786F0D04CEA25F7204F39) has an initial download size of 5220544 and total script size of 5220544
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker RPC policy file manifest
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker Standard
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker RPC log linker
build   06-Aug-2012 20:18:36    [INFO]    Emitting RPC log files
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker Export CompilationResult symbol maps
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker Emit compile report artifacts
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker RPC policy file manifest
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker Standard
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker RPC log linker
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker Export CompilationResult symbol maps
build   06-Aug-2012 20:18:36    [INFO]    Invoking Linker Emit compile report artifacts
build   06-Aug-2012 20:18:36    [INFO]    Linking Public artifacts into ....-SNAPSHOT
build   06-Aug-2012 20:18:36    [INFO]    Linking Deploy artifacts into ....-SNAPSHOT/WEB-INF/deploy
4

1 回答 1

0

解决了,是前段时间误提交的nocache.js文件。因此,新的 nocache.js 永远不会生成或不会覆盖它。

不完全确定这是如何发生的细节,但我不会进一步调查,我添加这个仅供将来参考。

于 2012-08-07T10:49:05.907 回答