2012-10-16 5 views
0

CruiseControl.net ccnet.config 파일에서 NANT 이름 .build 파일로 매개 변수 (예 : URL)를 전달하는 데 도움이 될 수 있습니까? 아래인수 구문 분석 CruiseControl.net에서 NANT

내가 시도 (하지만 성공하지) 당신이 CCNet 웹 사이트의 시나리오의 예에서

  **CC.net file** 

      <tasks> 
       <nant> 
        <executable>C:\Program Files (x86)\NANT\nant-0.92\bin\nant</executable> 
        <buildFile>C:\Program Files (x86)\NANT\nant-0.92\RiDM.Build</buildFile> 

        <targetList> 
         <target>build</target> 
        </targetList> 
        <buildArgs>-D:myProp=C:\build</buildArgs> 

       </nant> 
      </tasks> 

      **.build file** 

      <?xml version="1.0"?> 
       <project name="Parameter test File" > 
        <description>Test parameter passing among Cruise control and NANt files.enter code here </description> 


        <echo message="This is echo" /> 

        <if test="${property::exists('myProp')}" /> 
              <echo message="URL: ${myProp}" /> 
        <echo message="This is also echo" /> 

       </project> 

답변

1

네이게어 빌드 파일에 타겟이 없습니다.

echo와 같은 함수 호출은 대상 내에 있어야하며 순항 컨트롤의 buildArgs에서 대상을 지정해야합니다.

는 참조 http://nant.sourceforge.net/release/0.91/help/fundamentals/buildfiles.html

수정 NANT 스크립트

<project name="Parameter test File" > 
    <description>Test parameter passing among Cruise control and NANt files.enter code here</description> 
    <target name="build"> 
    <echo message="This is echo" /> 
    <if test="${property::exists('myProp')}"> 
     <echo message="URL: ${myProp}" /> 
     <echo message="This is also echo" /> 
    </if> 
    </target> 
</project> 

nNant이 build

+0

답장을 보내 주셔서 감사하지만 여전히 어둠 속에서 ... – Leo

+0

"여전히 어둠 속에서"라는 뜻은 무엇입니까? 사이먼의 대답이 문제를 해결해야합니다. –