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 To...@amis.com on 2007/04/10 23:19:04 UTC

publishing configurations

Hi there,

I'm fairly new to Ivy and trying to set up some projects with
configurations. Here's a pseudo-example of my use case -

Two projects A & B

A has no dependencies (other than source)
B depends on a binary artifact of A

A generates a number of artifacts, each of which I'd like to specify for
use with a configuration.
A's output is generated such that I can nicely use subdirectories for
config names
i.e.-

stage/
       |-config1/artifact1.out
       |-config2/artifact2.out
       |...

So in my ivy.xml file for A I have something like

    <configurations>
        <conf name="config1" description="provides artifact1" />
    </configurations>
    <publications>
        <artifact name="artifact1" type="out" ext="out" conf="config1"/>
    </publications>

And in my ivy:publish for A's build.xml, I have:

        <ivy:publish
                resolver="${ivy.resolver}"
                pubrevision="${build.revision}"
                srcivypattern="${ivy.project.dir}/ivy.xml"
                haltonmissing="false"
                forcedeliver="true" >
                <artifacts pattern="${stage.dir}/[conf]/[artifact].[ext]"
/>
                <artifacts pattern="${stage.dir}/[artifact].[ext]" />
        </ivy:publish>

note that I use the two artifact patterns because there are some artifacts
in the root stage dir and some in the conf-specific sub-dirs...

So when I run the build.xml, it seems as though it's only ever trying to
publish the 'default' conf.
i.e - following output...


[ivy:configure] :: configuring :: file = C:\ivy\ivyconf.xml

resolve:
[ivy:retrieve] :: resolving dependencies :: [ org | mymod | 200704101655 ]
[ivy:retrieve]  confs: [config1]
[ivy:retrieve] :: resolution report ::

---------------------------------------------------------------------
        |                  |            modules            ||   artifacts
|
        |       conf       | number| search|dwnlded|evicted||
number|dwnlded|

---------------------------------------------------------------------
        |      config1      |   0   |   0   |   0   |   0   ||   0   |   0
|

---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: [ org | mymod ]
[ivy:retrieve]  confs: [config1]
[ivy:retrieve]  0 artifacts copied, 0 already retrieved

publish:
[ivy:publish] :: publishing :: [ org | mymod ]
[ivy:publish]   published artifact1 to
C:/build_root/ivy/local-repository/org/mymod
/200704101714/default/artifact1.out


So it looks like the retrieve step knows about my conf's but publish just
uses the default - is there something I'm missing??
I'd like to be able to specify my dependency in B as something like:

    <dependencies>
        <dependency org="org" name="mymod" conf="default->config1"
rev="latest.integration" />
    </dependencies>

but if it never gets published, I don't see how it's going to work...

Any help is appreciated.

thanks
Todd

AMI Semiconductor - "Silicon Solutions for the Real World"
NOTICE: 
This electronic message contains information that may be confidential or privileged. The information is intended for the use of the individual or entity named above. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you received this electronic message in error, please notify the sender and delete the copy you received.