Здесь я пытаюсь вытащить файл из git, если он не присутствует в локальной папке, вот мой код.Как сделать git pull через build.xml (ant task)
<?xml version="1.0" encoding="utf-8"?>
<project name="MyProject" default="deploy">
<target name="deploy" depends="file-checks, local-file, git-file"/>
<target name="file-checks">
<available file="C:\Users\Hareesh\Desktop\H2H\conf\rdbms1.properties" property="file.found"/>
</target>
<target name="local-file" if="file.found">
<echo message="File is available in Local" />
</target>
<target name="git-file" unless="file.found">
<echo message="No" />
<git command = "clone">
<args>
<arg value = "git://github.com/280north/ojunit.git" />
<arg value = "ojunit" />
</args>
</git>
</target>
</project>
он показывает ниже ошибки:
Buildfile: C:\Users\Hareesh\Desktop\H2H\conf\build.xml
file-checks:
local-file:
git-file:
[echo] No
BUILD FAILED
C:\Users\Hareesh\Desktop\H2H\conf\build.xml:15: Problem: failed to create task or type git
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
Total time: 203 milliseconds
Я следовал ниже URL: http://tlrobinson.net/blog/2008/11/ant-tasks-for-git/
есть какие-либо ошибки в значениях ARG ?? я не могу найти, поскольку у меня нет знаний о командах git ... Пожалуйста, помогите мне .. Спасибо заранее.
Хорошо, я могу непосредственно включить этот macrodef под «ГИТОМ-файл» целевой –
теперь я понял процесс благодарственным you @manouti –
@HarithaR Да, вы можете включить макродеф в цель, но добавив его как элемент верхнего уровня снаружи, он станет видимым для всех целей в случае, если какая-то другая цель тоже захочет его использовать. – manouti