开发者

Get hudson to checkout source to a specific directory

This seems like a simple task but for the life of me I can't get Hudson to checkout my source to a specific directory. I can checkout the source using svn on the command line. I tried specifying the Local Module setting under source code management but no dice.

I set it to c:\source\trunk and I get this whe开发者_运维百科n i run the build.

Started by user anonymous
Checking out http://mysvnserver/trunk
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
    at java.io.WinNTFileSystem.canonicalize0(Native Method)
    at java.io.Win32FileSystem.canonicalize(Unknown Source)
    at java.io.File.getCanonicalPath(Unknown Source)
    at java.io.File.getCanonicalFile(Unknown Source)
    at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:742)
    at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:660)
    at hudson.FilePath.act(FilePath.java:753)
    at hudson.FilePath.act(FilePath.java:735)
    at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:653)
    at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:601)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1082)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
    at hudson.model.Run.run(Run.java:1280)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:293)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:137)
Finished: FAILURE

When i try to set a relative path it says I can't use absolute directories. i.e \source\trunk

All i want to have happen is hudson checkout my source to c:\source\trunk


As sbi already said:

Paths like the SVN are relative to the Workspace root. At least that's what the help for "Local module directory" says on the Job configuration page.

When you start a path with '\' than it means that the path is absolute. You have two options.

  1. Define a custom workspace for your job. This could be c:\source and the checkout of the source would be to trunk (or leave it empty if checking out your svn url ends with '/trunk'.
  2. check it out to your standard workspace and then copy it to C:\source\trunk.

BTW, I would favor the second option, because I try to avoid the custom workspace at almost all costs.


Paths like the SVN are relative to the Workspace root. At least that's what the help for "Local module directory" says on the Job configuration page.


The other workaround is to create MAster-Slave config in the same system on which Hudson is running. Create a slave on the same machine and point to the location where yu want yur projet to checkout in the Slave configuration

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜