我使用ivy和ant构建多个模块。当我使用解析器发布时,我可以根据工件类型指定多个工件模式吗?我看到解析器,在我的例子中是文件系统解析器,允许里面有多个工件元素。我可以用它来实现我的目的吗。如果是,如何?我试着在工件上添加type或ext属性,在文件系统解析器中,它抛出了异常:
no set method found for type on class org.apache.ivy.core.settings.IvyPattern
和
no set method found for ext on class org.apache.ivy.core.settings.IvyPattern
非常感谢您的帮助。
您可以在发布期间设置人工制品模式
<target name="publish" depends="jar, test" unless="option.noresolve" description="Publish produced artifacts in Ivy repository">
<ivy:publish pubrevision="${publish.version}" artifactspattern="${jars}/[artifact].[ext]" status="${publish.status}" resolver="local" forcedeliver="true" update="true" overwrite="true"/>
</target>
${jars}它只是一个输出jars的路径。
在ivy.xml中,您这样描述您的出版物:
<publications>
<artifact name="strongpoint" ext="jar" type="jar"/>
</publications>