ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mitch Gitman <mgit...@gmail.com>
Subject Re: I suspect I'm doing something I shouldn't
Date Tue, 18 Aug 2009 15:19:47 GMT
Maarten, I'm essentially resolving against an Ivy module that I expect was
already published. And here's where I realize now that I'm doing something
wrong, or at least strange. I'm publishing Ivy modules that have confs with
visibility="private", but if they're already up on the Ivy repository, then
those confs are never going to be reachable transitively through the module
I'm immediately using.

I'm doing the resolve programmatically and then checking the ResolveReport
for unresolved dependencies:
        IvyNode[] unresolvedDependencies =
resolveReport.getUnresolvedDependencies();

If I then call *IvyNode.getProblemMessage* on one of those unresolved nodes,
I see that message about the conf being expected to be public.

So now my question is, is there ever a valid situation where a published
ivy.xml has a private conf? I'm making the distinction here between a
published ivy.xml and the working ivy.xml for the current project.

On Tue, Aug 18, 2009 at 1:08 AM, Maarten Coene <maarten_coene@yahoo.com>wrote:

> And could you also tell us how you resolve?
>
> Maarten
>
>
>
>
> ----- Original Message ----
> From: Mitch Gitman <mgitman@gmail.com>
> To: ivy-user@ant.apache.org
> Sent: Tuesday, August 18, 2009 7:33:55 AM
> Subject: Re: I suspect I'm doing something I shouldn't
>
> I'm seeing now that the situation I had described is not quite accurate.
> The
> fact that a public conf extends a private conf has nothing to do with the
> unresolved dependency. Simply having a private conf in the ivy.xml will
> cause the problem to crop up:
> <conf name="abstract" visibility="private" />
>
> For example, the private test configuration in Ivy's own ivy.xml will cause
> this:
> configuration not public in org.apache.ant#ivy;2.1.0-rc2: 'test'. It was
> required from org.apache.ant#ivy-caller;working test
>
> I'm beginning to suspect that there's something misconfigured about how I'm
> resolving.
>
> On Mon, Aug 17, 2009 at 10:03 PM, Mitch Gitman <mgitman@gmail.com> wrote:
>
> > I have an ivy.xml file with some confs like so:
> > <conf name="abstract" visibility="private" />
> > <conf name="concrete" extends="abstract" visibility="public" />
> >
> > Note that I have a public Ivy conf extending a private one. Can anyone
> say
> > if I'm doing something valid or invalid--and then explain conceptually
> why?
> >
> > I suspect the answer is invalid because when I attempt to do an Ivy
> resolve
> > on this published Ivy module, I get an error message like so:
> > configuration not public in net.nilistics#test-module;1.0: 'abstract'. It
> > was required from net.nilistics#test-module-caller;working abstract
> >
> > I've traced this error message to this passage in the private
> *handleConfiguration
> > *method of *IvyNode*:
> >                 } else if (shouldBePublic && !isRoot()
> >                         && c.getVisibility() !=
> > Configuration.Visibility.PUBLIC) {
> >                     confsToFetch.remove(conf);
> >                     if (isConfRequiredByMergedUsageOnly(rootModuleConf,
> > conf)) {
> >                         Message.verbose(
> >                             "configuration required by evicted revision
> is
> > not visible in "
> >                             + "selected revision. skipping " + conf + "
> in
> > " + this);
> >                     } else {
> >                         problem = new RuntimeException("configuration not
> > public in " + this + ": '"
> >                             + c + "'. It was required from " + parent + "
> "
> > + parentConf);
> >                     }
> >                     return false;
> >                 }
> >
> > I am using Ivy 2.1.0-rc2.
> >
>
>
>
>
>

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