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: Publish ivydata for source type
Date Thu, 25 Feb 2010 18:15:36 GMT
Claudio, it's a really strange practice to be having one's Ivy cache double
as an Ivy repository. It's almost like you're asking Ivy to blow up. You can
avoid a whole lot of complexity by simply using a local repository that is
distinct from your cache.

The default Ivy settings--which are used if you don't specify Ivy
settings--already support a local repository. Even though, as a practical
matter, the default Ivy settings are not very usable because they make the
shared repo local, you can at least use them as a model for your own Ivy
settings. On the page
http://ant.apache.org/ivy/history/latest-milestone/tutorial/defaultconf.html,
see the passage that begins:
"By default, the local repository lies in
${ivy.default.ivy.user.dir}/local."

Following this model, your local Ivy repo becomes a sibling in the
filesystem of your Ivy cache(s).

One other thing you can do is adjust your Ivy settings for that particular
local resolver to avoid downloading the artifacts. Just use the artifacts
directly from the repo since, after all, the repo is already local. I forget
offhand what that particular attribute is.

On Thu, Feb 25, 2010 at 9:34 AM, Claudio Miranda <claudio@claudius.com.br>wrote:

>
> Hi, currently my project has a publish task to the local ivy cache and it
> (looks to) works.
>
> The issue is the IvyDE is not able to pickup the sources as it reads a
> ivy.xml from repo that doesn't have the sources configuration.
>
> Let me say that the modules and artifacts are published to the ivy local
> cache.
> I see that ivy creates a ivy-${version}.xml and
> ivydata-${version}.properties at
> ${ivy.cache.dir}/[organisation]/[artifact]/
> when ivy resolves the dependency (see 8 below)
>
> The publish task (see 3 below) creates the following directories: jars and
> sources
> ${ivy.cache.dir}/[organisation]/[artifact]/[type]s/
>
> I see that if I manually change the
> ${ivy.cache.dir}/[organisation]/[artifact]/ivy-1.1-SNAPSHOT.xml to include
> the sources configuration, IvyDE can pickup the sources instantly.
> If I uncomment the <ivy pattern=... at ivysettings.xml the
> ivy-1.1-SNAPSHOT.xml is published to the [organisation]/[artifact]
> directory
> but the resolve task of the other project (who dependes of
> commons-framework) fails (see 9 below).
> In this case looks the ivydata-1.1-SNAPSHOT.properties is missing.
>
> I ask:
> a) is there any best practice to use the local repo and ivy cache as the
> same directory ?
> b) Having the local repository the same as the ivy cache, how to publish
> the
> sources and have it resolved by IvyDE ?
>
> Thanks
>
> Claudio
>
>

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