2014-01-09 92 views
1

是否有任何方式在CruiseControl.NET的項目配置中使用項目名稱? 我嘗試了${project.name}根據其他職位不起作用。CruiseControl.NET在項目配置中使用項目名稱

<cruisecontrol xmlns:cb="urn:ccnet.config.builder"> 
    <cb:define BuildArtifactsMainDir="D:\CCNet\BuildArtifacts\"/> 
    <project name="MyProject"> 
    <artifactDirectory>$(BuildArtifactsMainDir)${project.name}</artifactDirectory> 
    <tasks> 
     <exec> 
     <executable>C:\Windows\System32\robocopy.exe</executable> 
     <buildArgs>D:\${project.name} F:\${project.name}</buildArgs> 
     <buildTimeoutSeconds>600</buildTimeoutSeconds> 
     <successExitCodes>0,1,3,4,8,16</successExitCodes> 
     </exec> 
    </tasks> 

回答

1

我不認爲有項目名稱的參數。您可以改用scopes

<cruisecontrol xmlns:cb="urn:ccnet.config.builder"> 
    <cb:define BuildArtifactsMainDir="D:\CCNet\BuildArtifacts\"/> 
    <cb:scope ProjectName="MyProject"> 
    <project name="$(ProjectName)"> 
     <artifactDirectory>$(BuildArtifactsMainDir)$(ProjectName)</artifactDirectory> 
     ... 
    </project> 
    </cb:scope>