Running externail script on BuildAgent
Hi, people.
Here is a little problem...
Have an BuildAgent running on Win7. Have a project. In project's pom.xml have:
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks>
<exec executable="file.bat"/>
</tasks>
File file.bat located in directory database_source which is project directory.
So - when I set full pathname inside pom.xml like:
<exec executable="C:\BuildAgent\work\5bc5889cb53ed441\database_source\file.bat"/>
It works. But if using relative path (like just executable="file.bat") - I got next in build-log:
[***database_source] [INFO] Executing tasks
If use full path - it works:
[***:database_source] [INFO] Executing tasks
So, script running from right directory:
echo C:\BuildAgent\work\5bc5889cb53ed441\database_source
Script content (just for tests):
set CURR_DIR=%cd%
echo INNT
echo %CURR_DIR%
So - if it's running from database_source - why it wan't accept path like "file.bat"?
Thanks for tips.
Please sign in to leave a comment.