David, forgive me beforehand for answering your question (A) with another
question and then (B) by sidestepping it.

Could you clarify what you mean by "local repository"? I think in the usual
Ivy parlance, this means local to an individual developer's machine. Do you
mean local to your machine or do you mean a shared/enterprise repository?

Now, if you're talking a shared repository, then the situation you're
describing should be a non-issue if you're relying on a continuous
integration server (like Hudson or CruiseControl)--and not individual
developers--to be doing the ivy:publish. Since the CI server is only going
to do builds on commits to version control, a publish will never happen
unless something has changed. I would make the argument that, unless you're
trying to get an Ivy repository out of an invalid state, then it is only the
CI server, and not developers, that should be doing publishes.

Now, if you're talking an Ivy repository that is local to your machine, then
you already have control over which Ant targets you're calling. So whenever
you need to do a build for your own sake, you just avoid calling the target
that does ivy:publish, up until you need to publish to your local
repository.

On Tue, Jan 20, 2009 at 2:31 PM, David Goblirsch <
dgoblir...@interactivebrokers.com> wrote:

> If I have no changes to my source code or ivy.xml, my build will do nothing
> EXCEPT that the "publish" task still wants to push them to the local
> repository.
> In order to get the build to not fail, I have to set overwrite to "true".
>
> My guess is I am missing something here. My "publish" task depends on the
> "jar" task since I want
> to publish to my local repository any newly updated jar. But with no
> changes, "compile" does nothing,
> "jar" does nothing, but "publish" does anyway. How do you get the publish
> task to
> do nothing if the artifact and the ivy file have not changed??
>
> Thanks.
>
>

Reply via email to