개선하려는 Ant/Ivy 빌드 프로세스가 있습니다. 의존성을 해결하고 특정 폴더로 추출해야합니다.Ant 대상 확장 대상 종속성 아카이브
종속성은 $(build_root)/dependency/downloads/[configuration]/[artifactId]/[version]/
위치로 확인되며 정상적으로 작동합니다. 그 자리에 .pom
과 .tar.bz2
파일로 끝납니다.
종속성의 .tar.bz2
을 디렉토리에 추출하는 것에 대해 좀 더 제어 할 수 있습니다. 우리는 기본적으로 .tar.bz2
출력의 추출이 이루어지는 방식과 위치를 제어하여 종속성의 충돌을 방지하려고 시도하고 있습니다 (lib
및 inc
).
우리는 현재 모든 종속성을 해결 한 다음 아카이브를 맹목적으로 확장 할 대상을 가지고 있습니다.
우리의 결심 단계는 외모와 같은 : 내가 가진 사랑을 무엇
<target name="expand-archives" description="Expand your Dependency Archives!">
<for param="file">
<path>
<fileset dir="${dependency.dir}" includes="**/*.tar.bz2"/>
</path>
<sequential>
<bunzip2 src="@{file}" dest="${dependency.dir}" />
</sequential>
</for>
<!-- Follow the bunzip2 by the tar command to extract the tarball -->
<for param="file">
<path>
<fileset dir="${dependency.dir}" includes="**/*.tar"/>
</path>
<sequential>
<echo message="Processing: @{file}"/>
<exec executable="tar" failonerror="true">
<arg value="-C"/>
<arg value="${dependency.dir}"/>
<arg value="-xvf"/>
<arg value="@{file}"/>
</exec>
</sequential>
</for>
</target>
가 dest="${dependency.dir}
입니다 :처럼 보이는
<target name="resolve">
<ivy:retrieve pattern="${dependency.dir}/[conf]/[artifact]/[artifact]-[revision].[ext]" conf="*" />
<condition property="archive.dir.present">
<resourceexists>
<file file="${dependency.dir}"/>
</resourceexists>
</condition>
<antcall if:set="archive.dir.present" target="expand-archives"/>
</target>
참고 "확장 - 아카이브"를 대상으로 별도의 전화, 의존성의 artifactID가 추가되었습니다.
검색 결과에서 [artifact]
정보를 가져와 expand-archives
대상으로 전달하는 방법이 있습니까? 당신이 아카이브 내에있는 파일에 대한 종속성이있는 경우
그리고 내가 나타납니다 내 문제를 해결하려면 '트리거'를 사용해야합니다. 일단 작동 시키면 업데이트 할게. 추가 제안 사항이나 팁을 환영합니다. –