Apache Ivy는 ivysettings.xml 파일에 제공된 아티팩트 패턴의 변수를 어떻게 해결합니까?
-
22-08-2019 - |
문제
내 ivysettings.xml 파일이 포함 된 경우
<url name="com.springsource.repository.bundles.external">
<ivy pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
내 Ivy.xml 파일은 다음과 같습니다.
<dependency org="org.junit"
name="com.springsource.org.junit"
rev="4.4.0" />
아이비를 달렸을 때부터 이것이 다음과 같은 결의를 말할 수 있습니다. http://repository.springsource.com/ivy/bundles/external/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-sources-4.4.0.jar
그래서 결의안은 다음과 같습니다.
[organization] => "org.junit"
[module] => "com.springsource.org.junit"
[revision] => "4.4.0"
[artifact] => "com.springsource.org.junit-sources"
[ext] => "jar"
아이비가 URL 패턴 (DUH)에서 [조직], [모듈] 및 [개정]을 어떻게 해결하는지 알 수 있지만 [artifact] 및 [ext]를 어떻게 해결합니까?
그만큼 URL Resolver에 대한 문서 부족한 것 같습니다.
해결책
아이비는 먼저 해결합니다 <ivy pattern... />
, 조직, 모듈 및 개정과 함께 [artifact]
"아이비"로 하드 코드와 [ext]
"XML"으로 하드 코드. 이 경우 URL이 생성됩니다.
이 모듈의 아이비 구성 파일입니다. 무엇 보다도이 아이비 구성 파일에는 다른 아티팩트에 대한 정보가 포함되어 있습니다.
<artifact name="com.springsource.org.junit-sources" type="src" ext="jar"/>
<artifact name="license" type="license" ext="txt"/>
이 두 가지를 완료하는 데 사용됩니다 <artifact pattern... />
부품 - 라이센스를 다운로드하고 JAR 파일을 다운로드하려면.
제휴하지 않습니다 StackOverflow