You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by "Obendorf, Keston" <ke...@intel.com> on 2011/09/16 00:01:58 UTC
[conf] in artifactspattern
Is it possible to use [conf] in the artifactspattern for ivy:publish?
A little bit of background, our product needs to be compiled a little differently for creating different installers, and so what happens is we just rebuild those binaries with a different Configuration which defines a conditional compilation symbol (Our code is in .Net). This creates multiple binaries with the same name, but with different code inside. We build these to bin\binaries, bin\external_binaries, etc., depending on the configuration.
So for our Ivy files, I was thinking that we could separate these as different Ivy conf's. With that decided, publishing the binaries will require [conf] in the artifactspattern:
<ivy:publish resolver="local-bin"
conf="binaries"
module="${ant.project.name}"
artifactspattern="bin\[conf]\[artifact].[ext]"
revision="${build.revision}"
overwrite="true"
srcivypattern="ivy.xml"
status="${build.status}"
update="true"/>
When I run this task, I fail to publish anything:
impossible to publish artifacts for cevt#Kernel;0: java.io.IOException: missing artifact cevt.ssa#Kernel;0!SSA.dll
However, if I replace [conf] with an explicit name, it publishes fine.
<ivy:publish resolver="local-bin"
conf="binaries"
module="${ant.project.name}"
artifactspattern="bin\binaries\[artifact].[ext]"
revision="${build.revision}"
overwrite="true"
srcivypattern="ivy.xml"
status="${build.status}"
update="true"/>
In the Ivy documentation it mentions that which properties are available can depend on what operation you are doing. Am I right in assuming [conf] is not available in ivy:publish artifactspattern?
Also, here's the resolver, if it matters to the question:
<filesystem name="local-bin">
<artifact pattern="${local.bin.dir}\[artifact].[ext]" />
<ivy pattern="${local.bin.dir}\ivy\[module].[ext]"/>
</filesystem>
And the relevant parts of the ivy file.
<ivy-module version="1.0">
<info organisation="cevt.ssa" module="Kernel"/>
<configurations>
<conf name="binaries" description="Includes all of the .dll files" />
......
</configurations>
<publications>
<artifact name="SSA" type="dll" conf="binaries" ext="dll" />
......
</publications>
</ivy-module>