在常春藤:发布者默认的deliverivypattern是$ {ivy.distrib.dir}/[type] s/[artifact] - [revision]( - [classifier]).[ext]
我尝试在我的ivy.xml中设置分类器,方法是在元素中添加属性e:classifier ="".
但[分类器]没有设定?当ivy:publish在我的build.xml文件中运行时,它似乎是空的,因此不包含在文件名模式中.
我想我已经找到了你的问题.
为了清楚起见,配置的解析器确定了存储库文件名而不是发布任务.这是我的例子,它在工件和常春藤文件名模式中使用了两个额外的属性greeting和author:
<ivysettings>
<property name="repo.dir" value="${ivy.basedir}/build/repo"/>
<property name="ivy.checksums" value=""/> <!-- Suppress the generation of checksums -->
<settings defaultResolver="internal"/>
<resolvers>
<filesystem name="internal">
<ivy pattern="${repo.dir}/[module]/[author]-ivy(-[greeting])-[revision].xml" />
<artifact pattern="${repo.dir}/[module]/[author]-[artifact]-[greeting]-[revision].[ext]" />
</filesystem>
</resolvers>
</ivysettings>
Run Code Online (Sandbox Code Playgroud)
额外属性的值由ivy.xml文件确定:
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
<info organisation="myorg" module="hello" e:author="Mark"/>
<publications>
<artifact name="English" ext="txt" type="doc" e:greeting="hello"/>
<artifact name="Irish" ext="txt" type="doc" e:greeting="dia_dhuit"/>
<artifact name="Spanish" ext="txt" type="doc" e:greeting="Hola"/>
</publications>
</ivy-module>
Run Code Online (Sandbox Code Playgroud)
当我发布文件时,肯定会出现问候语和作者标签的值:
$ find build -type f
build/repo/hello/Mark-English-hello-1.0.txt
build/repo/hello/Mark-Irish-dia_dhuit-1.0.txt
build/repo/hello/Mark-Spanish-Hola-1.0.txt
build/repo/hello/Mark-ivy-1.0.xml
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6397 次 |
| 最近记录: |