ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mitch Gitman <mgit...@gmail.com>
Subject default visibility of public not recognized on publish
Date Sun, 14 Mar 2010 03:45:04 GMT
I'm trying to figure out if this is the expected behavior or it's a bug. If
it is a bug, please forgive me for reporting what may already be well-known.
I'm using Ivy 2.1.0.

In an ivy.xml file, the conf element's visibility attribute has a default
value of "public". See:
http://ant.apache.org/ivy/history/latest-milestone/ivyfile/conf.html

So specifying this:
    <conf name="default" />
should be no different from specifying this:
    <conf name="default" visibility="public" />

Now, I have an artifact associated with the default conf:
    <artifact name="foo" type="jar" conf="default"/>

Then on my ivy:publish Ant task, I specify: conf="*(public)"
This is saying I only want to publish the public confs, not the private
ones.

With this restriction in place, if I explicitly specify visibility="public",
that artifact gets published. But if I don't, it doesn't get published. So
here's a situation where the default value is not being recognized as the
default.

By the way, if I take a look at the Ivy file that has been published to the
repository, I still see:
    <artifact name="foo" type="jar" conf="default"/>

In my opinion, it's important that the visibility attribute's default value
of public be recognized in all cases where it's applicable, especially this
one I've described:
A. A more rigorous, and arguably more correct, practice is to not publish
private confs.
B. Anyone adhering to this practice shouldn't have to be defensive about
always having to remember to specify visibility="public" on their conf
elements.

And I can attest, when one does run into this problem, it takes a good deal
of digging to get to the root.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message