Hudson - Maven 在 Tomcat-6 上失败(无法创建 /dev/null/.m2) - Gentoo

发布于 2024-09-03 18:13:25 字数 411 浏览 4 评论 0原文

我在使用 Tomcat 6 在 gentoo 服务器上启动和运行 Hudson 时遇到了重大问题。我能够很好地部署 Hudson,并且我可以浏览 Web 应用程序、配置它并设置构建等。

但是,当我尝试运行构建(例如在 Maven2 项目上的“干净测试”)我得到了这个错误,

ERROR: Failed to create /dev/null/.m2

我已经用 google 搜索过,对于某些人来说,它似乎有助于放置 -DHUDSON_HOME=/home/hudson 和 -DMAVEN_HOME=/ /etc/init.d/tomcat-6 的 JAVA_OPTS 中的 home/hudson。但是,我已经尝试过在 /etc/conf.d/tomcat-6 中执行相同的操作,但仍然收到此错误。

你们中有人曾经处理过这个问题吗?

I'm having major issues with getting Hudson up and running on a gentoo server with Tomcat 6. I'm able to deploy Hudson just fine, and I can browse the web-application, configure it and set up builds etc.

However, when I try to run a build (in example "clean test" on a Maven2 project) I get this error

ERROR: Failed to create /dev/null/.m2

I've google'd and for some it seems to be helping to put -DHUDSON_HOME=/home/hudson and -DMAVEN_HOME=/home/hudson in /etc/init.d/tomcat-6's JAVA_OPTS. However, I've tried that and by doing the same in /etc/conf.d/tomcat-6 , but I'm still getting this error.

Has any of you had to deal with this before?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

素染倾城色 2024-09-10 18:13:25

您可能在特殊用户下运行 Hudson。尝试使用 vipw 命令将该用户的主目录设置为 /etc/passwd 中的 /home/hudson。

You are likely running Hudson under a special user. Try setting the home directory of that user to /home/hudson in /etc/passwd using the vipw command.

时间你老了 2024-09-10 18:13:25

另一种方法是使用 $M2_HOME/conf/settings.xml 禁用用户级别配置,但 Jouni 的解决方案是更好的选择。

Another way would be to disable user level config with your $M2_HOME/conf/settings.xml but Jouni's solution is the better choice.

ゃ懵逼小萝莉 2024-09-10 18:13:25

如果您无法更改用户的主目录,您可以欺骗 Hudson/Jenkins 认为用户的主目录是另一个目录(之前创建的并且用户具有读写访问权限)。然后将其作为 Hudson/Jenkins 启动脚本中的参数传递,例如:

export JAVA_OPTS="$JAVA_OPTS -Duser.home=<path to the directory>"

If you cannot change the user's home directory, you can trick Hudson/Jenkins into thinking the user's home is another directory (previously created and which the user has read and write access). Then pass it as an argument in Hudson/Jenkins startup script, e.g.:

export JAVA_OPTS="$JAVA_OPTS -Duser.home=<path to the directory>"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文