如何在ivy中为解析程序指定多个工件模式

  • 本文关键字:模式 程序 ivy ant ivy
  • 更新时间 :
  • 英文 :


我使用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>

最新更新