Hudson持续集成服务器:怎么看的Windows映射是可见的蚂蚁目录? [英] Hudson continuous integration server: how to see Windows mapped directories that are visible to Ant?

查看:118
本文介绍了Hudson持续集成服务器:怎么看的Windows映射是可见的蚂蚁目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用哈德森,蚂蚁1.7,Tomcat的6.20,JDK 1.6和JDK 1.5;所有的Windows盒。

Using Hudson, Ant 1.7, Tomcat 6.20, JDK 1.6 and JDK 1.5; all on Windows boxes.

我对WAR文件Ant构建脚本使用存储在远程服务器上的JAR文件。到远程服务器的目录路径被映射为Windows网络驱动器。一个build.properties文件用于指定路径的JAR依赖关系。当使用Ant构建,无论是在命令行或在Eclipse中,战争构建和部署成功。

My Ant build script for a WAR file uses JARs stored on a remote server. The directory path to the remote server is mapped as a network drive in Windows. A build.properties file is used to specify the paths to the JAR dependencies. When building with Ant, either at command line or in Eclipse, the WAR builds and deploys successfully.

从build.properties示例:

Example from build.properties:

lib.log4j = S:/Support/JARs/log4j-1.2.15.jar

lib.log4j=S:/Support/JARs/log4j-1.2.15.jar

在上面的条目,在Windows中映射网络驱动器是S驱动。

In the above entry, the mapped network drive in Windows is the "S" drive.

我目前我的本地工作站上评估哈德森。在哈德森,如果我尝试使用映射网络驱动器路径的JAR,构建失败。如果我拷贝过来的JAR文件到本地目录(从而使它们在C:/支持/ JAR文件),生成成功编制并创建WAR

I am currently evaluating Hudson on my local workstation. In Hudson, if I attempt to use the mapped network drive path to the JARs, the build fails. If I copy over the JARs to a local directory (so that they are in C:/Support/JARs), the build succeeds in compiling and creating the WAR.

我怎样才能得到哈德森尊重映射的网络驱动器路径?此外,有没有一种方法,以避免传递哈德逊用户界面蚂蚁的论点,而是实际使用build.properties文件,而不是?哈德森似乎无法读取build.properties,否则

How can I get Hudson to respect the mapped network drive paths? Also, is there a way to avoid having to pass Ant arguments in the Hudson user interface, and instead actually use the build.properties file, instead? Hudson seems unable to read the build.properties, otherwise.

非常感谢。

迈克Quentel

推荐答案

我假设你正在运行哈德森作为Windows服务。服务环境是一个普通用户有所不同,例如,将具有最小或没有网络priveleges。此外,驱动器映射在登录时发生,是特定于用户会话 - 这样的服务实在看不出这些驱动器,因为服务仍然可能需要在用户注销后运行的驱动器映射的

I assume you're running hudson as a windows service. The service environment is somewhat different to a normal user, for instance it will have minimal or no network priveleges. Also, drive mapping happens during logon and is specific to the user session - so services can't really see these drives, as the services may still need to run after the user has logged off and the drives unmapped.

您可以尝试配置哈德森服务来使用网络priveleges一个帐户,并更改生成脚本中使用UNC路径(\\服务器类型路径)

You can try configuring the hudson service to use an account with network priveleges, and change the build scripts to use UNC paths (\server type paths)

另一种方法是做构建在其中从用户帐户登录运行奴隶。它会工作,但它是讨厌的。

The other alternative is to do builds in slaves which are running from a logged in user account. It'll work, but it's nasty.

与有用的信息有些链接:

Some links with useful info:


  1. 信息:服务和重定向驱动

  2. 当您创建Windows服务
  3. 的一些最佳实践说明
  1. INFO: Services and Redirected Drives
  2. Descriptions of some best practices when you create Windows Services

这篇关于Hudson持续集成服务器:怎么看的Windows映射是可见的蚂蚁目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆