在RedHat OpenShift上我创建了一个jenkins构建服务器。为了使它适用于我的自定义构建,我已将config.xml更改为numExecutors = 1。然后我添加了一个maven gwt项目来构建。构建失败,因为它无法创建用户首选项目录。请参阅此日志片段。
[INFO] --- gwt-maven-plugin:2.5.0-rc2:compile (default) @ web ---
[INFO] auto discovered modules [de.hpfsc.parent]
[ERROR] Apr 09, 2014 2:06:42 AM java.util.prefs.FileSystemPreferences$1 run
[ERROR] WARNING: Couldn't create user preferences directory. User preferences are unusable.
[ERROR] Apr 09, 2014 2:06:42 AM java.util.prefs.FileSystemPreferences$1 run
[ERROR] WARNING: java.io.IOException: No such file or directory
为了测试简单maven构建的正确工作,我在https://github.com/abroer/jsltSpringLocaleProblem.git上创建了一个新的jenkins项目。这个maven项目工作正确并且构建没有错误。
可以通过构建https://github.com/steinsag/gwt-maven-example.git项目来重新创建问题。
这是作业配置
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.plugins.openshift.OpenShiftApplicationUUIDJobProperty plugin="openshift@1.4">
<applicationUUID></applicationUUID>
</hudson.plugins.openshift.OpenShiftApplicationUUIDJobProperty>
<hudson.plugins.openshift.OpenShiftBuilderSizeJobProperty plugin="openshift@1.4">
<builderSize>small</builderSize>
</hudson.plugins.openshift.OpenShiftBuilderSizeJobProperty>
<hudson.plugins.openshift.OpenShiftBuilderTimeoutJobProperty plugin="openshift@1.4">
<builderTimeout>300000</builderTimeout>
</hudson.plugins.openshift.OpenShiftBuilderTimeoutJobProperty>
<hudson.plugins.openshift.OpenShiftBuilderTypeJobProperty plugin="openshift@1.4">
<builderType></builderType>
</hudson.plugins.openshift.OpenShiftBuilderTypeJobProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="git@1.1.12">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<name>origin</name>
<refspec>+refs/heads/*:refs/remotes/origin/*</refspec>
<url>https://github.com/steinsag/gwt-maven-example.git</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>**</name>
</hudson.plugins.git.BranchSpec>
</branches>
<recursiveSubmodules>false</recursiveSubmodules>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<authorOrCommitter>false</authorOrCommitter>
<clean>false</clean>
<wipeOutWorkspace>false</wipeOutWorkspace>
<pruneBranches>false</pruneBranches>
<remotePoll>false</remotePoll>
<buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
<gitTool>Default</gitTool>
<submoduleCfg class="list"/>
<relativeTargetDir></relativeTargetDir>
<excludedRegions></excludedRegions>
<excludedUsers></excludedUsers>
<gitConfigName></gitConfigName>
<gitConfigEmail></gitConfigEmail>
<skipTag>false</skipTag>
<scmName></scmName>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers class="vector"/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Maven>
<targets>clean package</targets>
<mavenName>(Default)</mavenName>
<usePrivateRepository>false</usePrivateRepository>
<settings class="jenkins.mvn.DefaultSettingsProvider"/>
<globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
</hudson.tasks.Maven>
</builders>
<publishers/>
<buildWrappers/>
</project>
答案 0 :(得分:2)
AFAICT,这些消息不应该无法编译。
GWT仅在一个地方使用首选项:更新检查,因此在上次检查更新时存储。这是在专用线程中异步完成的,并且不应该使构建失败。
GWT支持通过将-XdisableUpdateCheck
传递给Compiler
来禁用更新检查,但gwt-maven-plugin
不允许您这样做。尝试使用exec-maven-plugin
调用GWT编译器并传递-XdisableUpdateCheck
作为参数,看看它是否解决了您的问题。