ANT를 사용하여 로컬 컴퓨터에서 매핑 된 드라이브로 파일을 이동하고 싶습니다. net use 명령을 사용하여 Z 드라이브를 아래 위치에 매핑했습니다.
먼저 Z 드라이브를 내 todir로 만들려고했습니다.
<copy todir="Z:/Results/">
<fileset dir="${LocalResults}">
<include name="**/*"/>
</fileset>
</copy>
다음은 Jenkins의 출력입니다.
[copy] Copying 16 files to Z:\Results
Attempt to copy C:\Program Files\results\index.html to Z:\Results\index.html using NIO Channels failed due to 'failed to create the parent directory for Z:\Results\index.html'. Falling back to streams.
BUILD FAILED
C:\Deploy\copyResults.xml:69: Failed to copy C:\Program Files\results\index.html to Z:\Results\index.html due to java.io.FileNotFoundException Z:\Results\index.html(The system cannot find the path specified)
매핑 된 드라이브 대신 위치를 사용하면 작동합니다.
<copy todir="//IP Address/C$/ShareFolder/Results/">
<fileset dir="${LocalResults}">
<include name="**/*"/>
</fileset>
</copy>
todir에서 매핑 된 드라이브를 사용하면 작동하지 않는 이유가 있습니까?
시작하기위한 빠른 질문, Jenkins가 서비스가있는 Windows 서버에서 실행되고 있습니까?
이 경우 서비스 계정으로 인해 매핑 된 드라이브를 사용할 수 없다고 생각합니다.
폴더 URL로 작업하는 것이 좋습니다 : \\ MY_IP \ share \ drive
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다